<feed xmlns='http://www.w3.org/2005/Atom'>
<title>BMC/Intel-BMC/linux.git/drivers/gpio, branch dev-5.2</title>
<subtitle>Intel OpenBMC Linux kernel source tree (mirror)</subtitle>
<id>https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev-5.2</id>
<link rel='self' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev-5.2'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/'/>
<updated>2019-09-10T17:29:57+00:00</updated>
<entry>
<title>gpio: Add in ast2600 details to Aspeed driver</title>
<updated>2019-09-10T17:29:57+00:00</updated>
<author>
<name>Rashmica Gupta</name>
<email>rashmica.g@gmail.com</email>
</author>
<published>2019-09-06T06:37:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=98bf6fc5524ec5a3d173c4e2973353d000d0a9d7'/>
<id>urn:sha1:98bf6fc5524ec5a3d173c4e2973353d000d0a9d7</id>
<content type='text'>
The ast2600 is a new generation of SoC from ASPEED. Similarly to the
ast2400 and ast2500, it has a GPIO controller for it's 3.3V GPIO pins.
Additionally, it has a GPIO controller for 1.8V GPIO pins.

As the register names for both controllers are the same and the 36 1.8V
GPIOs and the first 36 of the 3.3V GPIOs are all bidirectional, we can
use the same configuration struct and use the ngpio property to
differentiate between the two sets of GPIOs.

OpenBMC-Staging-Count: 1
Signed-off-by: Rashmica Gupta &lt;rashmica.g@gmail.com&gt;
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
</content>
</entry>
<entry>
<title>gpio/aspeed: Use ngpio property from device tree if available</title>
<updated>2019-09-10T17:29:57+00:00</updated>
<author>
<name>Rashmica Gupta</name>
<email>rashmica.g@gmail.com</email>
</author>
<published>2019-09-06T06:27:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=825c305a9a87ea19a6bddce8cc45a2f26c0b2d4f'/>
<id>urn:sha1:825c305a9a87ea19a6bddce8cc45a2f26c0b2d4f</id>
<content type='text'>
Use the ngpio property from the device tree if it exists. If it doesn't
then fallback to the hardcoded value in the config.

This is in preparation for adding ast2600 support. The ast2600 SoC has
two GPIO controllers and so requires two instances of the GPIO driver.
We use the ngpio property to different between them as they have
different numbers of GPIOs.

OpenBMC-Staging-Count: 1
Signed-off-by: Rashmica Gupta &lt;rashmica.g@gmail.com&gt;
Reviewed-by: Joel Stanley &lt;joel@jms.id.au&gt;
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
</content>
</entry>
<entry>
<title>gpio/aspeed: Setup irqchip dynamically</title>
<updated>2019-09-10T17:29:57+00:00</updated>
<author>
<name>Rashmica Gupta</name>
<email>rashmica.g@gmail.com</email>
</author>
<published>2019-09-06T06:26:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=3308ddfa08facafbd6d1846f335fadeae57829af'/>
<id>urn:sha1:3308ddfa08facafbd6d1846f335fadeae57829af</id>
<content type='text'>
This is in preparation for adding ast2600 support. The ast2600 SoC
requires two instances of the GPIO driver as it has two GPIO
controllers. Each instance needs it's own irqchip.

OpenBMC-Staging-Count: 1
Signed-off-by: Rashmica Gupta &lt;rashmica.g@gmail.com&gt;
Reviewed-by: Joel Stanley &lt;joel@jms.id.au&gt;
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
</content>
</entry>
<entry>
<title>gpio/aspeed: Fix incorrect number of banks</title>
<updated>2019-09-10T17:29:57+00:00</updated>
<author>
<name>Rashmica Gupta</name>
<email>rashmica.g@gmail.com</email>
</author>
<published>2019-09-06T06:26:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=4fc18278f05742ec77626fecee9f0401ed69392c'/>
<id>urn:sha1:4fc18278f05742ec77626fecee9f0401ed69392c</id>
<content type='text'>
The current calculation for the number of GPIO banks is only correct if
the number of GPIOs is a multiple of 32 (if there were 31 GPIOs we would
currently say there are 0 banks, which is incorrect).

OpenBMC-Staging-Count: 1
Fixes: 361b79119a4b7 ('gpio: Add Aspeed driver')
Signed-off-by: Rashmica Gupta &lt;rashmica.g@gmail.com&gt;
Reviewed-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
Reviewed-by: Joel Stanley &lt;joel@jms.d.au&gt;
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
</content>
</entry>
<entry>
<title>gpio: aspeed: Pass irqchip when adding gpiochip</title>
<updated>2019-09-10T17:29:49+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2019-08-09T12:55:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=4aec70ac207512feedef6de4ae4472d6e8acfaf8'/>
<id>urn:sha1:4aec70ac207512feedef6de4ae4472d6e8acfaf8</id>
<content type='text'>
We need to convert all old gpio irqchips to pass the irqchip
setup along when adding the gpio_chip. For more info see
drivers/gpio/TODO.

For chained irqchips this is a pretty straight-forward
conversion.

Cc: Joel Stanley &lt;joel@jms.id.au&gt;
Cc: Andrew Jeffery &lt;andrew@aj.id.au&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Thierry Reding &lt;treding@nvidia.com&gt;
Link: https://lore.kernel.org/r/20190809125515.19094-1-linus.walleij@linaro.org
Reviewed-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
Tested-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
Acked-by: Joel Stanley &lt;joel@jms.id.au&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
(cherry picked from commit 8512ee31926296fd7d65c1b3c97bb20d67e7eb2a)
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
</content>
</entry>
<entry>
<title>gpio: Fix irqchip initialization order</title>
<updated>2019-09-10T09:35:25+00:00</updated>
<author>
<name>Linus Walleij</name>
<email>linus.walleij@linaro.org</email>
</author>
<published>2019-08-20T08:05:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=44dfa46aaf7cf594ac89bc1a0c0e56c498b31269'/>
<id>urn:sha1:44dfa46aaf7cf594ac89bc1a0c0e56c498b31269</id>
<content type='text'>
[ Upstream commit 48057ed1840fde9239b1e000bea1a0a1f07c5e99 ]

The new API for registering a gpio_irq_chip along with a
gpio_chip has a different semantic ordering than the old
API which added the irqchip explicitly after registering
the gpio_chip.

Move the calls to add the gpio_irq_chip *last* in the
function, so that the different hooks setting up OF and
ACPI and machine gpio_chips are called *before* we try
to register the interrupts, preserving the elder semantic
order.

This cropped up in the PL061 driver which used to work
fine with no special ACPI quirks, but started to misbehave
using the new API.

Fixes: e0d897289813 ("gpio: Implement tighter IRQ chip integration")
Cc: Thierry Reding &lt;treding@nvidia.com&gt;
Cc: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Cc: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Reported-by: Wei Xu &lt;xuwei5@hisilicon.com&gt;
Tested-by: Wei Xu &lt;xuwei5@hisilicon.com&gt;
Reported-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://lore.kernel.org/r/20190820080527.11796-1-linus.walleij@linaro.org
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>gpiolib: never report open-drain/source lines as 'input' to user-space</title>
<updated>2019-08-29T06:30:23+00:00</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bgolaszewski@baylibre.com</email>
</author>
<published>2019-08-06T11:41:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=a7ef13769f73ff5b5261d277d703b213f3a92b77'/>
<id>urn:sha1:a7ef13769f73ff5b5261d277d703b213f3a92b77</id>
<content type='text'>
commit 2c60e6b5c9241b24b8b523fefd3e44fb85622cda upstream.

If the driver doesn't support open-drain/source config options, we
emulate this behavior when setting the direction by calling
gpiod_direction_input() if the default value is 0 (open-source) or
1 (open-drain), thus not actively driving the line in those cases.

This however clears the FLAG_IS_OUT bit for the GPIO line descriptor
and makes the LINEINFO ioctl() incorrectly report this line's mode as
'input' to user-space.

This commit modifies the ioctl() to always set the GPIOLINE_FLAG_IS_OUT
bit in the lineinfo structure's flags field. Since it's impossible to
use the input mode and open-drain/source options at the same time, we
can be sure the reported information will be correct.

Fixes: 521a2ad6f862 ("gpio: add userspace ABI for GPIO line information")
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Link: https://lore.kernel.org/r/20190806114151.17652-1-brgl@bgdev.pl
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>gpiolib: fix incorrect IRQ requesting of an active-low lineevent</title>
<updated>2019-08-06T17:08:16+00:00</updated>
<author>
<name>Michael Wu</name>
<email>michael.wu@vatics.com</email>
</author>
<published>2019-07-08T05:23:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=4453c332136583fcb97a9e4f5851eaf33c91a378'/>
<id>urn:sha1:4453c332136583fcb97a9e4f5851eaf33c91a378</id>
<content type='text'>
commit 223ecaf140b1dd1c1d2a1a1d96281efc5c906984 upstream.

When a pin is active-low, logical trigger edge should be inverted to match
the same interrupt opportunity.

For example, a button pushed triggers falling edge in ACTIVE_HIGH case; in
ACTIVE_LOW case, the button pushed triggers rising edge. For user space the
IRQ requesting doesn't need to do any modification except to configuring
GPIOHANDLE_REQUEST_ACTIVE_LOW.

For example, we want to catch the event when the button is pushed. The
button on the original board drives level to be low when it is pushed, and
drives level to be high when it is released.

In user space we can do:

	req.handleflags = GPIOHANDLE_REQUEST_INPUT;
	req.eventflags = GPIOEVENT_REQUEST_FALLING_EDGE;

	while (1) {
		read(fd, &amp;dat, sizeof(dat));
		if (dat.id == GPIOEVENT_EVENT_FALLING_EDGE)
			printf("button pushed\n");
	}

Run the same logic on another board which the polarity of the button is
inverted; it drives level to be high when pushed, and level to be low when
released. For this inversion we add flag GPIOHANDLE_REQUEST_ACTIVE_LOW:

	req.handleflags = GPIOHANDLE_REQUEST_INPUT |
		GPIOHANDLE_REQUEST_ACTIVE_LOW;
	req.eventflags = GPIOEVENT_REQUEST_FALLING_EDGE;

At the result, there are no any events caught when the button is pushed.
By the way, button releasing will emit a "falling" event. The timing of
"falling" catching is not expected.

Cc: stable@vger.kernel.org
Signed-off-by: Michael Wu &lt;michael.wu@vatics.com&gt;
Tested-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>gpiolib: Preserve desc-&gt;flags when setting state</title>
<updated>2019-08-06T17:08:16+00:00</updated>
<author>
<name>Chris Packham</name>
<email>chris.packham@alliedtelesis.co.nz</email>
</author>
<published>2019-07-07T20:35:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=cda67846b748a9d9005587e3bed35ba22e2d0d5e'/>
<id>urn:sha1:cda67846b748a9d9005587e3bed35ba22e2d0d5e</id>
<content type='text'>
commit d95da993383c78f7efd25957ba3af23af4b1c613 upstream.

desc-&gt;flags may already have values set by of_gpiochip_add() so make
sure that this isn't undone when setting the initial direction.

Cc: stable@vger.kernel.org
Fixes: 3edfb7bd76bd1cba ("gpiolib: Show correct direction from the beginning")
Signed-off-by: Chris Packham &lt;chris.packham@alliedtelesis.co.nz&gt;
Link: https://lore.kernel.org/r/20190707203558.10993-1-chris.packham@alliedtelesis.co.nz
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>gpio: davinci: silence error prints in case of EPROBE_DEFER</title>
<updated>2019-07-28T06:27:21+00:00</updated>
<author>
<name>Keerthy</name>
<email>j-keerthy@ti.com</email>
</author>
<published>2019-07-08T08:49:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=0a4ea95469bf48b7ab2a85e6f10f6bd318e599e2'/>
<id>urn:sha1:0a4ea95469bf48b7ab2a85e6f10f6bd318e599e2</id>
<content type='text'>
commit 541e4095f388c196685685633c950cb9b97f8039 upstream.

Silence error prints in case of EPROBE_DEFER. This avoids
multiple/duplicate defer prints during boot.

Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Keerthy &lt;j-keerthy@ti.com&gt;
Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
