<feed xmlns='http://www.w3.org/2005/Atom'>
<title>starfive-tech/u-boot.git/include/asm-generic/gpio.h, branch visionfive_devel</title>
<subtitle>StarFive Tech U-Boot for VisionFive (JH7110) boards (mirror)</subtitle>
<id>https://git.radix-linux.su/starfive-tech/u-boot.git/atom?h=visionfive_devel</id>
<link rel='self' href='https://git.radix-linux.su/starfive-tech/u-boot.git/atom?h=visionfive_devel'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/'/>
<updated>2021-04-12T21:45:40+00:00</updated>
<entry>
<title>gpio: Drop dm_gpio_set_dir()</title>
<updated>2021-04-12T21:45:40+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2021-03-23T01:52:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=34f8fc7c859926174b02734b35e5d5112a8c9fe7'/>
<id>urn:sha1:34f8fc7c859926174b02734b35e5d5112a8c9fe7</id>
<content type='text'>
This function is not used. Drop it.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
</content>
</entry>
<entry>
<title>gpio: Add a way to read 3-way strapping pins</title>
<updated>2021-03-03T20:40:47+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2021-02-05T04:22:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=8a45b2205749252f61d26508d5de9dcce020b2ef'/>
<id>urn:sha1:8a45b2205749252f61d26508d5de9dcce020b2ef</id>
<content type='text'>
Using the internal vs. external pull resistors it is possible to get
27 different combinations from 3 strapping pins. Add an implementation
of this.

This involves updating the sandbox GPIO driver to model external and
(weaker) internal pull resistors. The get_value() method now takes account
of what is driving a pin:

   sandbox: GPIOD_EXT_DRIVEN - in which case GPIO_EXT_HIGH provides the
          value
   outside source - in which case GPIO_EXT_PULL_UP/DOWN indicates the
          external state and we work the final state using those flags and
          the internal GPIOD_PULL_UP/DOWN flags

Of course the outside source does not really exist in sandbox. We are just
modelling it for test purpose.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>gpio: Replace direction_input() and direction_output()</title>
<updated>2021-03-03T20:40:11+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2021-02-05T04:22:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=ca1e1f57beb29fbaf48f9488ada1b008dace8314'/>
<id>urn:sha1:ca1e1f57beb29fbaf48f9488ada1b008dace8314</id>
<content type='text'>
The new update_flags() method is more flexible since it allows the
driver to see the full flags all at once. Use that in preference to these
two functions. Add comments to that effect.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;

Reviewed-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
</content>
</entry>
<entry>
<title>dm: gpio: Add a way to update flags</title>
<updated>2021-03-03T20:40:10+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2021-02-05T04:22:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=7e0a96d559da493812220731535f5ba6351bcea1'/>
<id>urn:sha1:7e0a96d559da493812220731535f5ba6351bcea1</id>
<content type='text'>
It is convenient to be able to adjust some of the flags for a GPIO while
leaving others alone. Add a function for this.

Update dm_gpio_set_dir_flags() to make use of this.

Also update dm_gpio_set_value() to use this also, since this allows the
open-drain / open-source features to be implemented directly in the
driver, rather than using the uclass workaround.

Update the sandbox tests accordingly. This involves a lot of changes to
dm_test_gpio_opendrain_opensource() since we no-longer have the direciion
being reported differently depending on the open drain/open source flags.

Also update the STM32 drivers to let the uclass handle the active low/high
logic.

Drop the GPIOD_FLAGS_OUTPUT() macro which is no-longer used.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Tested-by: Kory Maincent &lt;kory.maincent@bootlin.com&gt;
Reviewed-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
Tested-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
Reviewed-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
Tested-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
</content>
</entry>
<entry>
<title>gpio: Rename dm_gpio_get_dir_flags() to dm_gpio_get_flags()</title>
<updated>2021-03-03T19:51:06+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2021-02-05T04:21:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=c0c1e62c6e47ffccca953c57df4624d685493584'/>
<id>urn:sha1:c0c1e62c6e47ffccca953c57df4624d685493584</id>
<content type='text'>
This function can be used to get any flags, not just direction flags.
Rename it to avoid confusion.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
Reviewed-by: Pratyush Yadav &lt;p.yadav@ti.com&gt;
</content>
</entry>
<entry>
<title>dm: gpio: Rename get_dir_flags() method to get_flags()</title>
<updated>2021-03-03T19:51:06+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2021-02-05T04:21:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=9648789e2634e30fc58ad7180a7c7815e6227061'/>
<id>urn:sha1:9648789e2634e30fc58ad7180a7c7815e6227061</id>
<content type='text'>
It is more useful to be able to read all the flags, not just the direction
ones. In fact this is what the STM32 driver does. Update the method name
to reflect this.

Tweak the docs a little and use 'flagsp' as the return argument, as is
common in driver model, to indicate it returns a value.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;

Reviewed-by: Pratyush Yadav &lt;p.yadav@ti.com&gt;
</content>
</entry>
<entry>
<title>dm: gpio: Rename set_dir_flags() method to update_flags()</title>
<updated>2021-03-03T19:51:06+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2021-02-05T04:21:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=13979fc44667cbc577f3c4d07b6692de104a3174'/>
<id>urn:sha1:13979fc44667cbc577f3c4d07b6692de104a3174</id>
<content type='text'>
The current method is a misnomer since it is also used (e.g. by stm32) to
update pull settings and open source/open drain.

Rename it and expand the documentation to cover a few more details.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Pratyush Yadav &lt;p.yadav@ti.com&gt;

Reviewed-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
</content>
</entry>
<entry>
<title>gpio: fix gpio_request_by_name() description</title>
<updated>2020-10-22T15:26:14+00:00</updated>
<author>
<name>Dario Binacchi</name>
<email>dariobin@libero.it</email>
</author>
<published>2020-10-11T12:25:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=7438d6a6c482d4584d9685aae92374aa9a22e8c1'/>
<id>urn:sha1:7438d6a6c482d4584d9685aae92374aa9a22e8c1</id>
<content type='text'>
Replace 'dev-&gt;dev' with '@desc-&gt;dev' in the gpio_request_by_name function
desc parameter description.

Signed-off-by: Dario Binacchi &lt;dariobin@libero.it&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>drivers: gpio: Add a managed API to get a GPIO from the device-tree</title>
<updated>2020-09-30T15:55:22+00:00</updated>
<author>
<name>Jean-Jacques Hiblot</name>
<email>jjhiblot@ti.com</email>
</author>
<published>2020-09-11T08:13:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=d4b722e3a85f3a5704501f3a71faa43db1979209'/>
<id>urn:sha1:d4b722e3a85f3a5704501f3a71faa43db1979209</id>
<content type='text'>
Add managed functions to get a gpio from the devce-tree, based on a
property name (minus the '-gpios' suffix) and optionally an index.

When the device is unbound, the GPIO is automatically released and the
data structure is freed.

Signed-off-by: Jean-Jacques Hiblot &lt;jjhiblot@ti.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Signed-off-by: Pratyush Yadav &lt;p.yadav@ti.com&gt;
</content>
</entry>
<entry>
<title>gpio: Add a method to convert a GPIO to ACPI</title>
<updated>2020-07-17T06:32:24+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2020-07-07T19:11:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=2912686c08c33aff5269512de962dffb35fbee7c'/>
<id>urn:sha1:2912686c08c33aff5269512de962dffb35fbee7c</id>
<content type='text'>
When generating ACPI tables we need to convert GPIOs in U-Boot to the ACPI
structures required by ACPI. This is a SoC-specific conversion and cannot
be handled by generic code, so add a new GPIO method to do the conversion.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Wolfgang Wallner &lt;wolfgang.wallner@br-automation.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
</entry>
</feed>
