mbox series

[RFC,0/2] pinctrl: bcm2835: Implement pin_conf_get

Message ID 20240204165852.166157-1-wahrenst@gmx.net
Headers show
Series pinctrl: bcm2835: Implement pin_conf_get | expand

Message

Stefan Wahren Feb. 4, 2024, 4:58 p.m. UTC
For years, the Raspberry Pi users relied on userspace programs to read
the pin configuration. In the meantime, it has become apparent that this
approach has reached its limits for various reasons.

This patch series now attempts to improve the debugging possibilities on
the kernel side in order to reduce the dependency on these userspace
programs.

Stefan Wahren (2):
  pinctrl: bcm2835: Implement bcm2835_pinconf_get
  pinctrl: bcm2835: Implement bcm2711_pinconf_get

 drivers/pinctrl/bcm/pinctrl-bcm2835.c | 78 ++++++++++++++++++++++++++-
 1 file changed, 76 insertions(+), 2 deletions(-)

--
2.34.1

Comments

Linus Walleij Feb. 7, 2024, 10:56 a.m. UTC | #1
On Sun, Feb 4, 2024 at 5:59 PM Stefan Wahren <wahrenst@gmx.net> wrote:

> For years, the Raspberry Pi users relied on userspace programs to read
> the pin configuration. In the meantime, it has become apparent that this
> approach has reached its limits for various reasons.
>
> This patch series now attempts to improve the debugging possibilities on
> the kernel side in order to reduce the dependency on these userspace
> programs.
>
> Stefan Wahren (2):
>   pinctrl: bcm2835: Implement bcm2835_pinconf_get
>   pinctrl: bcm2835: Implement bcm2711_pinconf_get

I don't see any problems with this, can I just apply the patches or do you
want to first resend them as non-RFC?

Yours,
Linus Walleij
Stefan Wahren Feb. 7, 2024, 11:33 a.m. UTC | #2
Hi Linus,

Am 07.02.24 um 11:56 schrieb Linus Walleij:
> On Sun, Feb 4, 2024 at 5:59 PM Stefan Wahren <wahrenst@gmx.net> wrote:
>
>> For years, the Raspberry Pi users relied on userspace programs to read
>> the pin configuration. In the meantime, it has become apparent that this
>> approach has reached its limits for various reasons.
>>
>> This patch series now attempts to improve the debugging possibilities on
>> the kernel side in order to reduce the dependency on these userspace
>> programs.
>>
>> Stefan Wahren (2):
>>    pinctrl: bcm2835: Implement bcm2835_pinconf_get
>>    pinctrl: bcm2835: Implement bcm2711_pinconf_get
> I don't see any problems with this, can I just apply the patches or do you
> want to first resend them as non-RFC?
since the second patch hasn't been tested with BCM7211, it would be nice
to get a feedback from Florian or someone else with this hardware?

Best regards
>
> Yours,
> Linus Walleij
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Florian Fainelli Feb. 7, 2024, 6:22 p.m. UTC | #3
On 2/7/24 03:33, Stefan Wahren wrote:
> Hi Linus,
> 
> Am 07.02.24 um 11:56 schrieb Linus Walleij:
>> On Sun, Feb 4, 2024 at 5:59 PM Stefan Wahren <wahrenst@gmx.net> wrote:
>>
>>> For years, the Raspberry Pi users relied on userspace programs to read
>>> the pin configuration. In the meantime, it has become apparent that this
>>> approach has reached its limits for various reasons.
>>>
>>> This patch series now attempts to improve the debugging possibilities on
>>> the kernel side in order to reduce the dependency on these userspace
>>> programs.
>>>
>>> Stefan Wahren (2):
>>>    pinctrl: bcm2835: Implement bcm2835_pinconf_get
>>>    pinctrl: bcm2835: Implement bcm2711_pinconf_get
>> I don't see any problems with this, can I just apply the patches or do 
>> you
>> want to first resend them as non-RFC?
> since the second patch hasn't been tested with BCM7211, it would be nice
> to get a feedback from Florian or someone else with this hardware?

Give me a few days to get there and I will run a test.
Stefan Wahren Feb. 25, 2024, 10:01 a.m. UTC | #4
Hi Florian,

Am 07.02.24 um 19:22 schrieb Florian Fainelli:
> On 2/7/24 03:33, Stefan Wahren wrote:
>> Hi Linus,
>>
>> Am 07.02.24 um 11:56 schrieb Linus Walleij:
>>> On Sun, Feb 4, 2024 at 5:59 PM Stefan Wahren <wahrenst@gmx.net> wrote:
>>>
>>>> For years, the Raspberry Pi users relied on userspace programs to read
>>>> the pin configuration. In the meantime, it has become apparent that
>>>> this
>>>> approach has reached its limits for various reasons.
>>>>
>>>> This patch series now attempts to improve the debugging
>>>> possibilities on
>>>> the kernel side in order to reduce the dependency on these userspace
>>>> programs.
>>>>
>>>> Stefan Wahren (2):
>>>>    pinctrl: bcm2835: Implement bcm2835_pinconf_get
>>>>    pinctrl: bcm2835: Implement bcm2711_pinconf_get
>>> I don't see any problems with this, can I just apply the patches or
>>> do you
>>> want to first resend them as non-RFC?
>> since the second patch hasn't been tested with BCM7211, it would be nice
>> to get a feedback from Florian or someone else with this hardware?
>
> Give me a few days to get there and I will run a test.

is there any chance to test with BCM7211?
Stefan Wahren Feb. 27, 2024, 8:07 p.m. UTC | #5
Hi Florian,

Am 27.02.24 um 01:22 schrieb Florian Fainelli:
> On 2/25/24 02:01, Stefan Wahren wrote:
>> Hi Florian,
>>
>> Am 07.02.24 um 19:22 schrieb Florian Fainelli:
>>> On 2/7/24 03:33, Stefan Wahren wrote:
>>>> Hi Linus,
>>>>
>>>> Am 07.02.24 um 11:56 schrieb Linus Walleij:
>>>>> On Sun, Feb 4, 2024 at 5:59 PM Stefan Wahren <wahrenst@gmx.net>
>>>>> wrote:
>>>>>
>>>>>> For years, the Raspberry Pi users relied on userspace programs to
>>>>>> read
>>>>>> the pin configuration. In the meantime, it has become apparent that
>>>>>> this
>>>>>> approach has reached its limits for various reasons.
>>>>>>
>>>>>> This patch series now attempts to improve the debugging
>>>>>> possibilities on
>>>>>> the kernel side in order to reduce the dependency on these userspace
>>>>>> programs.
>>>>>>
>>>>>> Stefan Wahren (2):
>>>>>>    pinctrl: bcm2835: Implement bcm2835_pinconf_get
>>>>>>    pinctrl: bcm2835: Implement bcm2711_pinconf_get
>>>>> I don't see any problems with this, can I just apply the patches or
>>>>> do you
>>>>> want to first resend them as non-RFC?
>>>> since the second patch hasn't been tested with BCM7211, it would be
>>>> nice
>>>> to get a feedback from Florian or someone else with this hardware?
>>>
>>> Give me a few days to get there and I will run a test.
>>
>> is there any chance to test with BCM7211?
>
> Sorry about the delay, I just gave those patches a try although I am
> not sure where I should be seeing the reporting about being configured
> as pull up/down? Is this supposed to be visible under
> /sys/kernel/debug/pinctrl/*.gpio-pinctrl-bcm2711/pins?
It should be .../pinconf-pins
>
> Checking the datasheet for 2711/7211 we advertise 50kOhms internal
> pull ups/downs for all GPIO pins, so we might need to make the
> resistor value different based upon the board/SoC maybe.
Thanks for this, in this case i would change the resistor values to
50000 Ohms. The CM4 datasheet actually provide a range.

Regards