-
由 Pho Tran 提交于
Similar to some other CP210x device types, CP2108 has a number of GPIO pins that can be exposed through gpiolib. CP2108 has four serial interfaces but only one set of GPIO pins, which is modelled as a single gpio chip and registered as a child of the first interface. CP2108 has 16 GPIOs so the width of the state variables needs to be extended to 16 bits and this is also reflected in the control requests. Like CP2104, CP2108 have GPIO pins with configurable alternate functions and pins unavailable for GPIO use are determined and reported to gpiolib at probe. Signed-off-by: NPho Tran <pho.tran@silabs.com> Co-developed-by: NTung Pham <tung.pham@silabs.com> Signed-off-by: NTung Pham <tung.pham@silabs.com> [ johan: rewrite gpio get() and set(); misc cleanups; amend commit message ] Link: https://lore.kernel.org/r/20210610132844.25495-1-johan@kernel.orgSigned-off-by: NJohan Hovold <johan@kernel.org>
8051334e