Where should special purpose GPIO drivers go?
Jon Medhurst (Tixy) <tixy@...>
I know $subject it's an oxymoron but it's accurate. I have some special
purpose registers to drive hardwired fixed function pins and I'm making
these available to the rest of the system using drivers which implement
the GPIO API. I was wondering whereabouts under the drivers/ directory
E.g. one register type is for accessing a pair open collector data/clk
pins wired for bitbang I2C . Does the driver for this belong under
drivers/i2c because it's being used for I2C or under drivers/gpio
because it implements the GPIO API, or somewhere else?
I also have a general purpose driver to represent any 32-bit memory
mapped register using the GPIO API, where would that live? I created
that because my SoC (actually FPGA ) has several miscellaneous
registers, some of the bits of which are used for things like SPI chip
select, so I need a GPIO based API to use with the SPI driver.
Note, the SoC also has proper GPIO but the above functions aren't part
of that IP block, so I believe separate drivers are appropriate.