Re: [PATCH 3/5] mmc: slot-gpio: use gpiod_set_active_[low|high]()

From
Linus Walleij <hidden>
Date
2023-09-13 12:24:43
Also in
linux-gpio, linux-mmc, lkml, platform-driver-x86
Reply to
Bartosz Golaszewski, 2023-09-13
On Wed, Sep 13, 2023 at 1:50 PM Bartosz Golaszewski [off-list ref] wrote:
From: Bartosz Golaszewski <redacted>

We have new, less cumbersome and clearer interfaces for controlling GPIO
polarity. Use them in the MMC code.

Signed-off-by: Bartosz Golaszewski <redacted>
I like the looks of the code better, obviously but this looks like this for
a reason unfortunately.

See the following from
Documentation/devicetree/bindings/mmc/mmc-controller.yaml:

  # CD and WP lines can be implemented on the hardware in one of two
  # ways: as GPIOs, specified in cd-gpios and wp-gpios properties, or
  # as dedicated pins. Polarity of dedicated pins can be specified,
  # using *-inverted properties. GPIO polarity can also be specified
  # using the GPIO_ACTIVE_LOW flag. This creates an ambiguity in the
  # latter case. We choose to use the XOR logic for GPIO CD and WP
  # lines.  This means, the two properties are "superimposed," for
  # example leaving the GPIO_ACTIVE_LOW flag clear and specifying the
  # respective *-inverted property property results in a
  # double-inversion and actually means the "normal" line polarity is
  # in effect.

Will you still provide the desired "double inversion" after this patch?

Yours,
Linus Walleij
Thread (24 messages) 24 messages, 7 authors, last reply 2023-09-14
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help