From: "Vishnu Reddy" <vishnu.reddy@samsung.com>
To: "'Krzysztof Kozlowski'" <krzk@kernel.org>,
"'Krzysztof Kozlowski'" <krzysztof.kozlowski@linaro.org>,
<s.nawrocki@samsung.com>, <alim.akhtar@samsung.com>,
<linus.walleij@linaro.org>
Cc: <linux-arm-kernel@lists.infradead.org>,
<linux-samsung-soc@vger.kernel.org>, <linux-gpio@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <pankaj.dubey@samsung.com>,
<ravi.patel@samsung.com>, <gost.dev@samsung.com>
Subject: RE: [PATCH v2] pinctrl: samsung: Add support for pull-up and pull-down
Date: Wed, 3 Jul 2024 08:49:22 +0530 [thread overview]
Message-ID: <00e601daccf7$ce1d5c30$6a581490$@samsung.com> (raw)
In-Reply-To: <b1b6ccc8-ab83-4d4e-8902-769e12975580@kernel.org>
> -----Original Message-----
> From: Krzysztof Kozlowski [mailto:krzk@kernel.org]
> Sent: 27 June 2024 20:58
> To: Vishnu Reddy <vishnu.reddy@samsung.com>; 'Krzysztof Kozlowski'
> <krzysztof.kozlowski@linaro.org>; s.nawrocki@samsung.com;
> alim.akhtar@samsung.com; linus.walleij@linaro.org
> Cc: linux-arm-kernel@lists.infradead.org; linux-samsung-
> soc@vger.kernel.org; linux-gpio@vger.kernel.org; linux-
> kernel@vger.kernel.org; pankaj.dubey@samsung.com;
> ravi.patel@samsung.com; gost.dev@samsung.com
> Subject: Re: [PATCH v2] pinctrl: samsung: Add support for pull-up and pull-
> down
>
> On 27/06/2024 17:22, Krzysztof Kozlowski wrote:
> > On 27/06/2024 15:35, Vishnu Reddy wrote:
> >>>
> >>> I don't remember the code used here, but usually such choices are
> >>> determined by driver match data (and flags or value customized per
> variant).
> >> Hi, Thanks for suggestion.
> >> I have gone through this and found that driver match data in this driver is
> stored in the __initconst section, which is freed up after kernel initialization.
> So we have two options:
> >> 1: Keep this platform specific data in driver match data and then populate
> driver_data field in probe function.
> >> 2: Use compatible matching and set different values during set_config.
> >>
> >> First approach will result in many changes, such as populating driver
> match data for all platforms and then storing the same in driver_data in
> probe.
> >>
> >> In the second approach, we can handle this using simple if/else based on
> a compatible match.
> >>
> >> IMO, second approach would be simpler and introduce less changes. Any
> suggestions from your end?
> >
> > Please wrap your email according to mailing list style.
> >
> > Both options are not the way because you introduce a new, different
> > style of handling per-variant customization. The driver already parses
> > match data and stores such per-variant-details in different places, like
> > samsung_pin_bank or samsung_pinctrl_drv_data. This seems like a value
> > fixed per entire device, so could go to samsung_pinctrl_drv_data.
>
> ... although maybe this matches your first option? Not sure.
My understanding is same that the value is fixed per entire device. We can
add the pud data into samsung_pinctrl_drv_data and then fetch the pud
values during probe.
I will test this and submit v3 soon.
>
> Best regards,
> Krzysztof
prev parent reply other threads:[~2024-07-03 3:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20240620103950epcas5p10514d4a19bdfd505d7d92ceb1fe10cc7@epcas5p1.samsung.com>
2024-06-20 10:34 ` [PATCH v2] pinctrl: samsung: Add support for pull-up and pull-down Vishnu Reddy
2024-06-24 3:54 ` Alim Akhtar
2024-06-24 13:56 ` Krzysztof Kozlowski
2024-06-26 11:49 ` Vishnu Reddy
2024-06-26 13:01 ` Krzysztof Kozlowski
2024-06-27 13:35 ` Vishnu Reddy
2024-06-27 15:22 ` Krzysztof Kozlowski
2024-06-27 15:27 ` Krzysztof Kozlowski
2024-07-03 3:19 ` Vishnu Reddy [this message]
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='00e601daccf7$ce1d5c30$6a581490$@samsung.com' \
--to=vishnu.reddy@samsung.com \
--cc=alim.akhtar@samsung.com \
--cc=gost.dev@samsung.com \
--cc=krzk@kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=pankaj.dubey@samsung.com \
--cc=ravi.patel@samsung.com \
--cc=s.nawrocki@samsung.com \
/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