Re: [PATCH 3/3] input: gpio_keys: Make use of the device property API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 29, 2016 at 04:24:16PM +0000, sergk sergk2mail wrote:
> But how then to obtain gpio name or if it is possible the list of all
> available names?
> For example decoded ACPI DSDT shows the following:
> how to get gpio name for mentioned in your reply function?

For existing systems that do not provide _DSD naming for GPIOs you still
can provide them in the driver itself (ugly but works). See
Documentation/acpi/gpio-properties.txt chapter "ACPI GPIO Mappings
Provided by Drivers".

> Does it according below DSDT should be "GPO1" or "INT33FC" or something other?

No. The DSDT below does not have any names.

> Kind regards,
>                        Serge Kolotylo.
> 
>  Device (TCS5)
>             {
>                 Name (_ADR, Zero)  // _ADR: Address
>                 Name (_HID, "CHPN0001")  // _HID: Hardware ID
>                 Name (_CID, "PNP0C50" /* HID Protocol Device (I2C bus)
> */)  // _CID: Compatible ID
>                 Name (_S0W, Zero)  // _S0W: S0 Device Wake State
>                 Name (_DEP, Package (0x02)  // _DEP: Dependencies
>                 {
>                     GPO1,
>                     I2C5
>                 })
>                 Method (_PS3, 0, Serialized)  // _PS3: Power State 3
>                 {
>                 }
> 
>                 Method (_PS0, 0, Serialized)  // _PS0: Power State 0
>                 {
>                     If ((^^^GPO1.AVBL == One))
>                     {
>                         ^^^GPO1.TCD3 = Zero

Note that all these are part of GPIO Operation Region and not accessible
to the i2c-hid driver. The will be used when the device is powered on
and the pinctrl-baytrail has been loaded (that provides the Operation
Region).

If you need to use GPIOs from driver, they are listed in _CRS of the
device.

>                     }
> 
>                     Sleep (0x05)
>                     If ((^^^I2C5.PMI1.AVBG == One))
>                     {
>                         ^^^I2C5.PMI1.TCON = One
>                     }
> 
>                     Sleep (0x1E)
>                     If ((^^^GPO1.AVBL == One))
>                     {
>                         ^^^GPO1.TCD3 = One
>                     }
> 
>                     Sleep (0x78)
>                 }
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux