<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pm24.git/include/linux/gpio, branch v6.7-rc7</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://git.kobert.dev/pm24.git/atom?h=v6.7-rc7</id>
<link rel='self' href='https://git.kobert.dev/pm24.git/atom?h=v6.7-rc7'/>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/'/>
<updated>2023-11-04T09:22:52Z</updated>
<entry>
<title>gpiolib: remove gpiochip_find()</title>
<updated>2023-11-04T09:22:52Z</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bartosz.golaszewski@linaro.org</email>
</author>
<published>2023-09-05T18:53:09Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=2654521d774f9461234bcf3d089185404abd110b'/>
<id>urn:sha1:2654521d774f9461234bcf3d089185404abd110b</id>
<content type='text'>
With all users of gpiochip_find() converted to using gpio_device_find(),
we can now remove this function from the kernel.

Signed-off-by: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpiolib: provide gpio_device_get_base()</title>
<updated>2023-10-13T07:05:57Z</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bartosz.golaszewski@linaro.org</email>
</author>
<published>2023-09-05T18:52:55Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=8c85a102fc4e5c0c942c10677fa43f7a19baa92f'/>
<id>urn:sha1:8c85a102fc4e5c0c942c10677fa43f7a19baa92f</id>
<content type='text'>
Let's start adding getters for the opaque struct gpio_device. Start with
a function allowing to retrieve the base GPIO number.

Signed-off-by: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpiolib: provide gpiod_to_gpio_device()</title>
<updated>2023-10-13T06:50:04Z</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bartosz.golaszewski@linaro.org</email>
</author>
<published>2023-10-11T13:02:03Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=370232d096e3fe188e4596f77bc6560636bd40c1'/>
<id>urn:sha1:370232d096e3fe188e4596f77bc6560636bd40c1</id>
<content type='text'>
Accessing struct gpio_chip backing a GPIO device is only allowed for the
actual providers of that chip.

Similarly to how we introduced gpio_device_find() in order to replace
the abused gpiochip_find(), let's introduce a counterpart to
gpiod_to_chip() that returns a reference to the GPIO device owning the
descriptor. This is done in order to later remove gpiod_to_chip()
entirely.

Signed-off-by: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
Reviewed-by: Peter Rosin &lt;peda@axentia.se&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpiolib: provide gpio_device_to_device()</title>
<updated>2023-10-13T06:50:01Z</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bartosz.golaszewski@linaro.org</email>
</author>
<published>2023-10-11T13:02:02Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=1559d14977b694570f010854b8192e6de034bc27'/>
<id>urn:sha1:1559d14977b694570f010854b8192e6de034bc27</id>
<content type='text'>
There are users in the kernel who need to retrieve the address of the
struct device backing the GPIO device. Currently they needlessly poke in
the internals of GPIOLIB. Add a dedicated getter function.

Signed-off-by: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
Reviewed-by: Peter Rosin &lt;peda@axentia.se&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpiolib: provide gpio_device_find_by_fwnode()</title>
<updated>2023-10-12T08:36:39Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2023-10-11T20:26:35Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=668706b10c9b8181a53bd8881a77bb81b328ab33'/>
<id>urn:sha1:668706b10c9b8181a53bd8881a77bb81b328ab33</id>
<content type='text'>
One of the ways of looking up GPIO devices is using their fwnode.
Provide a helper for that to avoid every user implementing their
own matching function.

Reviewed-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
Tested-by: Dipen Patel &lt;dipenp@nvidia.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/20231010151709.4104747-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: acpi: remove acpi_get_and_request_gpiod()</title>
<updated>2023-10-09T12:47:15Z</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bartosz.golaszewski@linaro.org</email>
</author>
<published>2023-09-26T14:59:43Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=74975b4f2836e3cc10eeb6c38a6da54311e1de5b'/>
<id>urn:sha1:74975b4f2836e3cc10eeb6c38a6da54311e1de5b</id>
<content type='text'>
With no more users, we can remove acpi_get_and_request_gpiod().

Signed-off-by: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
Reviewed-by: From: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>gpiolib: reluctantly provide gpio_device_get_chip()</title>
<updated>2023-10-04T11:30:15Z</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bartosz.golaszewski@linaro.org</email>
</author>
<published>2023-09-27T14:29:26Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=9b418780844c677669ab474f6f29940ef545c954'/>
<id>urn:sha1:9b418780844c677669ab474f6f29940ef545c954</id>
<content type='text'>
The process of converting all unauthorized users of struct gpio_chip to
using dedicated struct gpio_device function will be long so in the
meantime we must provide a way of retrieving the pointer to struct
gpio_chip from a GPIO device.

Signed-off-by: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpiolib: provide gpio_device_get_desc()</title>
<updated>2023-10-04T11:29:56Z</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bartosz.golaszewski@linaro.org</email>
</author>
<published>2023-09-27T14:29:25Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=93548f8bbbbf5b62dbd37c8f61a037a06666787b'/>
<id>urn:sha1:93548f8bbbbf5b62dbd37c8f61a037a06666787b</id>
<content type='text'>
Getting the GPIO descriptor directly from the gpio_chip struct is
dangerous as we don't take the reference to the underlying GPIO device.
In order to start working towards removing gpiochip_get_desc(), let's
provide a safer variant that works with an existing reference to struct
gpio_device.

Signed-off-by: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpiolib: provide gpio_device_find_by_label()</title>
<updated>2023-10-04T11:29:45Z</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bartosz.golaszewski@linaro.org</email>
</author>
<published>2023-09-27T14:29:24Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=d62fcd9f1897d587f8f9db3f77ccae8797a44b5d'/>
<id>urn:sha1:d62fcd9f1897d587f8f9db3f77ccae8797a44b5d</id>
<content type='text'>
By far the most common way of looking up GPIO devices is using their
label. Provide a helpers for that to avoid every user implementing their
own matching function.

Signed-off-by: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpiolib: provide gpio_device_find()</title>
<updated>2023-10-04T11:29:31Z</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bartosz.golaszewski@linaro.org</email>
</author>
<published>2023-09-27T14:29:23Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=cfe102f63308c8c8e01199a682868a64b83f653e'/>
<id>urn:sha1:cfe102f63308c8c8e01199a682868a64b83f653e</id>
<content type='text'>
gpiochip_find() is wrong and its kernel doc is misleading as the
function doesn't return a reference to the gpio_chip but just a raw
pointer. The chip itself is not guaranteed to stay alive, in fact it can
be deleted at any point. Also: other than GPIO drivers themselves,
nobody else has any business accessing gpio_chip structs.

Provide a new gpio_device_find() function that returns a real reference
to the opaque gpio_device structure that is guaranteed to stay alive for
as long as there are active users of it.

Signed-off-by: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
</feed>
