<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/gpio/gpio-generic.c, branch linux-4.6.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.6.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.6.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-02-23T15:05:32Z</updated>
<entry>
<title>gpio: generic: Use devm_gpiochip_add_data() for gpio registration</title>
<updated>2016-02-23T15:05:32Z</updated>
<author>
<name>Laxman Dewangan</name>
</author>
<published>2016-02-22T12:13:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c05f813b96f260f214870e1f16bd98c2892c872d'/>
<id>urn:sha1:c05f813b96f260f214870e1f16bd98c2892c872d</id>
<content type='text'>
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.

Signed-off-by: Laxman Dewangan &lt;ldewangan@nvidia.com&gt;
</content>
</entry>
<entry>
<title>gpio: generic: factor into gpio_chip struct</title>
<updated>2016-01-05T10:21:00Z</updated>
<author>
<name>Linus Walleij</name>
</author>
<published>2015-12-04T13:02:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0f4630f3720e7e6e921bf525c8357fea7ef3dbab'/>
<id>urn:sha1:0f4630f3720e7e6e921bf525c8357fea7ef3dbab</id>
<content type='text'>
The separate struct bgpio_chip has been a pain to handle, both
by being confusingly similar in name to struct gpio_chip and
for being contained inside a struct so that struct gpio_chip
is contained in a struct contained in a struct, making several
steps of dereferencing necessary.

Make things simpler: include the fields directly into
&lt;linux/gpio/driver.h&gt;, #ifdef:ed for CONFIG_GENERIC_GPIO, and
get rid of the &lt;linux/basic_mmio_gpio.h&gt; altogether. Prefix
some of the member variables with bgpio_* and add proper
kerneldoc while we're at it.

Modify all users to handle the change and use a struct
gpio_chip directly. And while we're at it: replace all
container_of() dereferencing by gpiochip_get_data() and
registering the gpio_chip with gpiochip_add_data().

Cc: arm@kernel.org
Cc: Alexander Shiyan &lt;shc_work@mail.ru&gt;
Cc: Shawn Guo &lt;shawnguo@kernel.org&gt;
Cc: Sascha Hauer &lt;kernel@pengutronix.de&gt;
Cc: Kukjin Kim &lt;kgene@kernel.org&gt;
Cc: Alexandre Courbot &lt;gnurou@gmail.com&gt;
Cc: Brian Norris &lt;computersforpeace@gmail.com&gt;
Cc: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Cc: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
Cc: Lorenzo Pieralisi &lt;lorenzo.pieralisi@arm.com&gt;
Cc: Nicolas Pitre &lt;nicolas.pitre@linaro.org&gt;
Cc: Olof Johansson &lt;olof@lixom.net&gt;
Cc: Vladimir Zapolskiy &lt;vladimir_zapolskiy@mentor.com&gt;
Cc: Rabin Vincent &lt;rabin@rab.in&gt;
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-omap@vger.kernel.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: bcm-kernel-feedback-list@broadcom.com
Acked-by: Gregory Fong &lt;gregory.0xf0@gmail.com&gt;
Acked-by: Liviu Dudau &lt;Liviu.Dudau@arm.com&gt;
Acked-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Acked-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;
Acked-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: generic: fix signedness bug found by cppcheck</title>
<updated>2016-01-05T10:13:28Z</updated>
<author>
<name>Linus Walleij</name>
</author>
<published>2016-01-05T10:13:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4b63739efabc93d67d2b6812dd0cd41358fadf29'/>
<id>urn:sha1:4b63739efabc93d67d2b6812dd0cd41358fadf29</id>
<content type='text'>
cppcheck reports this:

(style) int result is returned as long value. If the return
value is long to avoid loss of information, then you have
loss of information.

This can be fixed with (1UL &lt;&lt; pin) but that is the same
as using &lt;linux/bitops.h&gt; that already use 1UL so take
this approach.

Reported-by: David Binderman &lt;dcb314@hotmail.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'v4.4-rc6' into devel</title>
<updated>2015-12-21T08:36:21Z</updated>
<author>
<name>Linus Walleij</name>
</author>
<published>2015-12-21T08:36:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0529357f102b96f68bc199f858d1c3b07f4b674c'/>
<id>urn:sha1:0529357f102b96f68bc199f858d1c3b07f4b674c</id>
<content type='text'>
Linux 4.4-rc6
</content>
</entry>
<entry>
<title>gpio: generic: clamp values from bgpio_get_set()</title>
<updated>2015-12-17T14:47:38Z</updated>
<author>
<name>Linus Walleij</name>
</author>
<published>2015-12-10T14:55:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=67a76aafec00db46fbd65d7d17a1cde1adde70c5'/>
<id>urn:sha1:67a76aafec00db46fbd65d7d17a1cde1adde70c5</id>
<content type='text'>
The bgpio_get_set() call should return a value clamped to [0,1],
the current code will return a negative value if reading
bit 31, which turns the value negative as this is a signed value
and thus gets interpreted as an error by the gpiolib core.
Found on the gpio-mxc but applies to any MMIO driver.

Cc: stable@vger.kernel.org # 4.3+
Cc: kernel@pengutronix.de
Cc: Vladimir Zapolskiy &lt;vladimir_zapolskiy@mentor.com&gt;
Fixes:  e20538b82f1f ("gpio: Propagate errors from chip-&gt;get()")
Reported-by: Clemens Gruber &lt;clemens.gruber@pqgruber.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: change member .dev to .parent</title>
<updated>2015-11-19T08:24:35Z</updated>
<author>
<name>Linus Walleij</name>
</author>
<published>2015-11-04T08:56:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=58383c78425e4ee1c077253cf297b641c861c02e'/>
<id>urn:sha1:58383c78425e4ee1c077253cf297b641c861c02e</id>
<content type='text'>
The name .dev in a struct is normally reserved for a struct device
that is let us say a superclass to the thing described by the struct.
struct gpio_chip stands out by confusingly using a struct device *dev
to point to the parent device (such as a platform_device) that
represents the hardware. As we want to give gpio_chip:s real devices,
this is not working. We need to rename this member to parent.

This was done by two coccinelle scripts, I guess it is possible to
combine them into one, but I don't know such stuff. They look like
this:

@@
struct gpio_chip *var;
@@
-var-&gt;dev
+var-&gt;parent

and:

@@
struct gpio_chip var;
@@
-var.dev
+var.parent

and:

@@
struct bgpio_chip *var;
@@
-var-&gt;gc.dev
+var-&gt;gc.parent

Plus a few instances of bgpio that I couldn't figure out how
to teach Coccinelle to rewrite.

This patch hits all over the place, but I *strongly* prefer this
solution to any piecemal approaches that just exercise patch
mechanics all over the place. It mainly hits drivers/gpio and
drivers/pinctrl which is my own backyard anyway.

Cc: Haavard Skinnemoen &lt;hskinnemoen@gmail.com&gt;
Cc: Rafał Miłecki &lt;zajec5@gmail.com&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Cc: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
Cc: Alek Du &lt;alek.du@intel.com&gt;
Cc: Jaroslav Kysela &lt;perex@perex.cz&gt;
Cc: Takashi Iwai &lt;tiwai@suse.com&gt;
Acked-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Acked-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Acked-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Acked-by: Hans-Christian Egtvedt &lt;egtvedt@samfundet.no&gt;
Acked-by: Jacek Anaszewski &lt;j.anaszewski@samsung.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: generic: Revert to old error handling in bgpio_map</title>
<updated>2015-10-27T10:26:31Z</updated>
<author>
<name>Guenter Roeck</name>
</author>
<published>2015-10-21T07:12:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b2f68b6306dbdbfd9b8cf46c697b52efa78f9ad6'/>
<id>urn:sha1:b2f68b6306dbdbfd9b8cf46c697b52efa78f9ad6</id>
<content type='text'>
Returning an error instead of NULL in bgpio_map if
platform_get_resource_byname does not find a resource was introduced with
commit cf3f2a2c8bae ("gpio: generic: improve error handling in bgpio_map").
This results in several qemu runtime failures with default and non-default
configurations, if attempts are made to boot from mmcblk0. Examples for
failures with multi_v7_defconfig are

Machine: vexpress-a9	dtb: vexpress-v2p-ca9
Machine: vexpress-a15	dtb: vexpress-v2p-ca15-tc1

Crash:

VFS: Cannot open root device "mmcblk0" or unknown-block(0,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

Looking into the code, always returning an error if bgpio_map fails
does not appear to make much sense, since the code in bgpio_setup_io
specifically supports some of the resources to be NULL.

Fixes: cf3f2a2c8bae ("gpio: generic: improve error handling in bgpio_map")
Cc: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: generic: use error pointers</title>
<updated>2015-10-05T07:16:28Z</updated>
<author>
<name>Heiner Kallweit</name>
</author>
<published>2015-09-30T21:52:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8d2402605b85be860808961cd82fdc4bd8bc1704'/>
<id>urn:sha1:8d2402605b85be860808961cd82fdc4bd8bc1704</id>
<content type='text'>
Use the ERRPTR standard way to return an error code in a pointer
thus simplifiying the code.

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: generic: modernize remapping</title>
<updated>2015-10-05T07:14:44Z</updated>
<author>
<name>Heiner Kallweit</name>
</author>
<published>2015-09-30T21:51:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=43960b4731d3450fe82105c40ee19d487622e427'/>
<id>urn:sha1:43960b4731d3450fe82105c40ee19d487622e427</id>
<content type='text'>
Replace devm_request_mem_region / devm_ioremap with devm_ioremap_resource.

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: generic: improve error handling in bgpio_map</title>
<updated>2015-10-05T07:13:39Z</updated>
<author>
<name>Heiner Kallweit</name>
</author>
<published>2015-09-30T21:50:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cf3f2a2c8bae0db72233629c9da9d9f617b3f8af'/>
<id>urn:sha1:cf3f2a2c8bae0db72233629c9da9d9f617b3f8af</id>
<content type='text'>
If bgpio_map returns NULL then err should always be set.

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
</feed>
