linux-samsung-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: George Stark <GNStark@sberdevices.ru>
Cc: "thierry.reding@gmail.com" <thierry.reding@gmail.com>,
	"krzysztof.kozlowski@linaro.org" <krzysztof.kozlowski@linaro.org>,
	"alim.akhtar@samsung.com" <alim.akhtar@samsung.com>,
	"linux-pwm@vger.kernel.org" <linux-pwm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-samsung-soc@vger.kernel.org" 
	<linux-samsung-soc@vger.kernel.org>,
	kernel <kernel@sberdevices.ru>
Subject: Re: [RFC PATCH v1] Revert "pwm: Clear chip_data in pwm_put()"
Date: Wed, 8 Mar 2023 17:52:02 +0100	[thread overview]
Message-ID: <20230308165202.gaeziqdncbkeo5l6@pengutronix.de> (raw)
In-Reply-To: <cc73a82d-89fa-1edf-650a-a1a3824cc791@sberdevices.ru>

[-- Attachment #1: Type: text/plain, Size: 1510 bytes --]

Hello George,

On Wed, Mar 08, 2023 at 12:16:00PM +0000, George Stark wrote:
> On 3/8/23 00:28, Uwe Kleine-König wrote:
> > If you ask me, better drop pwm_set_chip_data() completely. It adds no
> > useful value. It's just a variant of driver data and using both
> > complicates the driver and probably fragments memory allocations. Also
> > the sematic of driver data is better known as it's the same for all
> > subsystems.
> >
> > Do you use the capture functionality? In my eyes the capture part of the
> > pwm subsystem is very alien. Only a small subset of the hardware
> > supports this and the counter framework should be better suited for such
> > tasks.
> I don't use pwm-sti driver. I update meson pwm driver for new chips
> and when started using pwm_set_chip_data in probe I was very surprised that
> my data is lost after sysfs export/unexport calls. Then I found the 
> patch and
> checked other drivers for similar usecases.

OK.

> Probably you're right about dropping pwm_set_chip_data.

If you want to tackle that, you might want to take

	https://lore.kernel.org/all/20210504132537.62072-2-u.kleine-koenig@pengutronix.de/

into account. (Both to reuse this patch to prepare pwm-berlin for
dropping pwm_set_chip_data and to be prepared that back then Thierry
opposed to the idea.)

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      reply	other threads:[~2023-03-08 16:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-07 21:00 [RFC PATCH v1] Revert "pwm: Clear chip_data in pwm_put()" George Stark
2023-03-07 21:27 ` Uwe Kleine-König
2023-03-08 12:16   ` George Stark
2023-03-08 16:52     ` Uwe Kleine-König [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=20230308165202.gaeziqdncbkeo5l6@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=GNStark@sberdevices.ru \
    --cc=alim.akhtar@samsung.com \
    --cc=kernel@sberdevices.ru \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=thierry.reding@gmail.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;
as well as URLs for NNTP newsgroup(s).