From: holger.brunck@keymile.com (Holger Brunck)
To: linux-arm-kernel@lists.infradead.org
Subject: label string for kirkwood gpiochip
Date: Thu, 15 Dec 2011 15:40:08 +0100 [thread overview]
Message-ID: <4EEA06C8.5010302@keymile.com> (raw)
In-Reply-To: <alpine.LFD.2.02.1112150920430.2907@xanadu.home>
On 12/15/2011 03:22 PM, Nicolas Pitre wrote:
>>
>> The newer kernel version handles the gpiochip on kirkwood in a different way.
>> The orion_gpio_init function in arch/arm/mach-kirkwood/irq.c was called twice.
>> Once for first 32 gpios and a second time for the remaining 18 gpios. This
>> causes that the gpio framework shows two gpiochips in the sysfs with the same
>> label (orion_gpio).
>>
>> [@km_kirkwood /]# cat /sys/class/gpio/gpiochip0/label
>> orion_gpio
>> [@km_kirkwood /]# cat /sys/class/gpio/gpiochip32/label
>> orion_gpio
>>
>> So my question is simply, shouldn't be the string for a gpiochip unique in the
>> system and therefore this should be fixed or was this intended?
>
> I don't think that was intended.
>
Ok, how should this be done? We could add an additional param chip_label to
void __init orion_gpio_init(int gpio_base, int ngpio,
u32 base, int mask_offset, int secondary_irq_base);
and fix the callers accordingly or we could add a simple static counter in
orion_gpio_init and add a suffix _0, _1, _2 to the label to make it unique
without touching the clients...
Best regards
Holger
next prev parent reply other threads:[~2011-12-15 14:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-15 13:54 label string for kirkwood gpiochip Holger Brunck
2011-12-15 14:22 ` Nicolas Pitre
2011-12-15 14:40 ` Holger Brunck [this message]
2011-12-17 16:44 ` Nicolas Pitre
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=4EEA06C8.5010302@keymile.com \
--to=holger.brunck@keymile.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.