[PATCH] iio: max5487: Add support for Maxim digital potentiometers
Daniel Baluta
daniel.baluta at gmail.com
Wed Mar 9 18:18:42 EET 2016
+ firefly
On Wed, Mar 9, 2016 at 6:17 PM, Daniel Baluta <daniel.baluta at gmail.com> wrote:
> On Wed, Mar 9, 2016 at 2:43 PM, Daniel Baluta <daniel.baluta at gmail.com> wrote:
>> On Wed, Mar 9, 2016 at 1:07 AM, Cristina Moraru
>> <cristina.moraru09 at gmail.com> wrote:
>>> Add implementation for Maxim MAX5487, MAX5488, MAX5489
>>> digital potentiometers.
>>>
>>> Signed-off-by: Cristina Moraru <cristina.moraru09 at gmail.com>
>
> Also, as discussed you need to drive /CS low before any wiper
> register write and then drive /CS high.
>
> /CS will be controlled via a GPIO pin.
>
> Here, is partial ACPI dsdt file that you should use in order
> to access a GPIO pin:
>
> Device (STAC)
> {
> Name (_HID, "GDIX1001")
> ...
>
> Method (_CRS, 0, Serialized)
> {
> Name (RBUF, ResourceTemplate ()
> {
> I2cSerialBus (0x0014, ControllerInitiated, 0x00061A80,
> AddressingMode7Bit, "\\I2C0",
> 0x00, ResourceConsumer, ,
> )
>
> GpioInt (Edge, ActiveHigh, Exclusive, PullNone, 0x0000,
> "\\I2C0", 0x00, ResourceConsumer, ,
> )
> { // Pin list
> 0
> }
>
> GpioIo (Exclusive, PullDown, 0x0000, 0x0000,
> IoRestrictionOutputOnly, "\\I2C0", 0x00,
> ResourceConsumer, ,
> )
> {
> 1
> }
> })
> Return (RBUF)
> }
>
>
> Use only GpioIO part.
>
> Then, you can follow the code from drivers/iio/proximity/sx9500.c to
> see an example
> on how to work with GPIOs.
>
> Look at the sx9500_gpio_probe and gpio_set_value functions.
>
> thanks,
> Daniel.
More information about the firefly
mailing list