mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Richard <thomas.richard@bootlin.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Gary Wang <is0124@gmail.com>
Cc: Andy Shevchenko <andy@kernel.org>,
	Linus Walleij <linusw@kernel.org>,
	Daniele Cleri <danielecleri@aaeon.eu>,
	JunYingLai <junyinglai@aaeon.com.tw>,
	Louis Chen <louischen@aaeon.com.tw>,
	BillyChou <BillyChou@aaeon.com.tw>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH v3 4/5] pinctrl: upboard: fix I2C pinmux-select set CPLD GPIO OUT not function mode
Date: Thu, 26 Nov 2026 18:43:20 +0100	[thread overview]
Message-ID: <42cbe8ff-cfe9-4720-8d5f-685e7ff1c560@bootlin.com> (raw)
In-Reply-To: <awhQ0mvdzSw9NaVM@ashevche-desk.local>

On 11/26/26 4:31 PM, Andy Shevchenko wrote:
> On Thu, Nov 26, 2026 at 05:25:37PM +0200, Andy Shevchenko wrote:
>> On Thu, Nov 26, 2026 at 11:09:47PM +0800, Gary Wang wrote:
>>> The CPLD I2C pin mode setting through pinmux-select is not correct.
>>> Should be set UPBOARD_PIN_MODE_FUNCTION on AANT0F04 devices.
>>>
>>> Set UPBOARD_PIN_MODE_FUNCTION to 1 to prevent a NULL pointer
>>> dereference error on .modes[i] for any pin group using this setting.
> 
> Hmm... bit how the modes[i] can be messed up here? 0 is integer
> and NULL is void *...
> 
> Can you provide a compiler warning or traceback of broken kernel with this?
> 

I guess the problem is here [1]. It should triggers a NULL pointer error
when you select the I2C0/1 functions.

His patch fixes 2 issues:
- The first one is the wrong pin mode for I2C0/1 functions
(UPBOARD_PIN_MODE_FUNCTION instead of UPBOARD_PIN_MODE_GPIO_OUT) which
makes the second one visible.
- The second one is having UPBOARD_PIN_MODE_FUNCTION=0 because of [1].

[1]
https://elixir.bootlin.com/linux/v7.4-rc1/source/drivers/pinctrl/pinctrl-upboard.c#L713

Best Regards,
Thomas




  reply	other threads:[~2026-11-26 17:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-26 15:09 [PATCH v3 0/5] upboard pinctrl support for device id INTC1055 & INTC1057 & INTC105E Gary Wang
2026-11-26 15:09 ` [PATCH v3 1/5] pinctrl: tigerlake: add ish_uart groups and functions for INTC1055 Gary Wang
2026-11-26 15:09 ` [PATCH v3 2/5] pinctrl: alderlake: add some groups and functions for INTC1057 Gary Wang
2026-11-26 15:09 ` [PATCH v3 3/5] pinctrl: meteorlake: add some groups and functions for INTC105E Gary Wang
2026-11-26 15:09 ` [PATCH v3 4/5] pinctrl: upboard: fix I2C pinmux-select set CPLD GPIO OUT not function mode Gary Wang
2026-11-26 15:25   ` Andy Shevchenko
2026-11-26 15:31     ` Andy Shevchenko
2026-11-26 17:43       ` Thomas Richard [this message]
2026-11-26 20:23         ` Andy Shevchenko
2026-11-26 15:09 ` [PATCH v3 5/5] pinctrl: upboard: add device id INTC1055 & INTC1057 & INTC105E based UP boards support Gary Wang
2026-11-26 15:23 ` [PATCH v3 0/5] upboard pinctrl support for device id INTC1055 & INTC1057 & INTC105E Andy Shevchenko
2026-11-26 15:36   ` GaryWang
2026-11-26 15:53     ` Andy Shevchenko

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=42cbe8ff-cfe9-4720-8d5f-685e7ff1c560@bootlin.com \
    --to=thomas.richard@bootlin.com \
    --cc=BillyChou@aaeon.com.tw \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=andy@kernel.org \
    --cc=danielecleri@aaeon.eu \
    --cc=is0124@gmail.com \
    --cc=junyinglai@aaeon.com.tw \
    --cc=linusw@kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=louischen@aaeon.com.tw \
    --cc=stable@vger.kernel.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

all inboxes | Powered by JetHome®