Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: nsekhar@ti.com (Sekhar Nori)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] ARM: davinci: fix GPIO lookup for I2C
Date: Tue, 1 May 2018 17:06:37 +0530	[thread overview]
Message-ID: <6e63c820-efae-c94e-fab6-52980ee978f2@ti.com> (raw)
In-Reply-To: <2a6e2e81-05f9-1759-c921-3891adcfb854@lechnology.com>

On Friday 27 April 2018 07:13 AM, David Lechner wrote:
> On 04/24/2018 09:35 AM, Sekhar Nori wrote:
>> The GPIO chip is called davinci_gpio.0 in legacy mode. Fix it, so that
>> I2C can correctly lookup the recovery gpios.
>>
>> Note that it is the gpio-davinci driver that sets the gpiochip label to
>> davinci_gpio.0.
>>
>> Also, the I2C device uses an id of 1 on DM644x and DM355.
>>
>> Fixes: e53537653791 ("i2c/ARM: davinci: Deep refactoring of I2C
>> recovery")
>> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
>> ---
>> ? arch/arm/mach-davinci/board-dm355-evm.c? | 6 +++---
>> ? arch/arm/mach-davinci/board-dm644x-evm.c | 6 +++---
>> ? 2 files changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/arch/arm/mach-davinci/board-dm355-evm.c
>> b/arch/arm/mach-davinci/board-dm355-evm.c
>> index cb30637d9eaf..14557f893798 100644
>> --- a/arch/arm/mach-davinci/board-dm355-evm.c
>> +++ b/arch/arm/mach-davinci/board-dm355-evm.c
>> @@ -110,11 +110,11 @@ static struct platform_device
>> davinci_nand_device = {
>> ? };
>> ? ? static struct gpiod_lookup_table i2c_recovery_gpiod_table = {
>> -??? .dev_id = "i2c_davinci",
>> +??? .dev_id = "i2c_davinci.1",
>> ????? .table = {
>> -??????? GPIO_LOOKUP("davinci_gpio", 15, "sda",
>> +??????? GPIO_LOOKUP("davinci_gpio.0", 15, "sda",
>> ????????????????? GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
>> -??????? GPIO_LOOKUP("davinci_gpio", 14, "scl",
>> +??????? GPIO_LOOKUP("davinci_gpio.0", 14, "scl",
>> ????????????????? GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
>> ????? },
>> ? };
>> diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c
>> b/arch/arm/mach-davinci/board-dm644x-evm.c
>> index 5bf024784738..5b0b95e04cac 100644
>> --- a/arch/arm/mach-davinci/board-dm644x-evm.c
>> +++ b/arch/arm/mach-davinci/board-dm644x-evm.c
>> @@ -597,11 +597,11 @@ static struct i2c_board_info __initdata
>> i2c_info[] =? {
>> ? };
>> ? ? static struct gpiod_lookup_table i2c_recovery_gpiod_table = {
>> -??? .dev_id = "i2c_davinci",
>> +??? .dev_id = "i2c_davinci.1",
>> ????? .table = {
>> -??????? GPIO_LOOKUP("davinci_gpio", 44, "sda",
>> +??????? GPIO_LOOKUP("davinci_gpio.0", 44, "sda",
>> ????????????????? GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
>> -??????? GPIO_LOOKUP("davinci_gpio", 43, "scl",
>> +??????? GPIO_LOOKUP("davinci_gpio.0", 43, "scl",
>> ????????????????? GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
>> ????? },
>> ? };
>>
> 
> Why not use the GPIO_TO_PIN() macro like the previous patches?

I was just following the existing style. But, yes, I can fix that up.

Thanks,,
Sekhar

  reply	other threads:[~2018-05-01 11:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-24 14:35 [PATCH 0/4] ARM: davinci: GPIO look-up fixes for legacy boot Sekhar Nori
2018-04-24 14:35 ` [PATCH 1/4] ARM: davinci: board-da830-evm: fix GPIO lookup for MMC/SD Sekhar Nori
2018-04-27  1:39   ` David Lechner
2018-04-24 14:35 ` [PATCH 2/4] ARM: davinci: board-da850-evm: " Sekhar Nori
2018-04-27  1:40   ` David Lechner
2018-05-15 22:53     ` Adam Ford
2018-05-16 10:14       ` Sekhar Nori
2018-05-16 13:34         ` Adam Ford
2018-04-24 14:35 ` [PATCH 3/4] ARM: davinci: fix GPIO lookup for I2C Sekhar Nori
2018-04-27  1:43   ` David Lechner
2018-05-01 11:36     ` Sekhar Nori [this message]
2018-04-24 14:35 ` [PATCH 4/4] ARM: davinci: board-omapl138-hawk: fix GPIO numbers for MMC/SD lookup Sekhar Nori
2018-04-27  1:58   ` David Lechner
2018-05-01 12:16 ` [PATCH 0/4] ARM: davinci: GPIO look-up fixes for legacy boot Sekhar Nori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6e63c820-efae-c94e-fab6-52980ee978f2@ti.com \
    --to=nsekhar@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox