Linux Media Controller development
 help / color / mirror / Atom feed
From: Philippe De Muyter <phdm@macq.eu>
To: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Sakari Ailus <sakari.ailus@iki.fi>,
	linux-media@vger.kernel.org, Leon Luo <leonl@leopardimaging.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	linux-kernel@vger.kernel.org, hverkuil@xs4all.nl,
	laurent.pinchart@ideasonboard.com
Subject: Re: [PATCH 3/7] media: imx274: don't hard-code the subdev name to DRIVER_NAME
Date: Tue, 28 Aug 2018 10:11:32 +0200	[thread overview]
Message-ID: <20180828081132.GA17946@frolo.macqel> (raw)
In-Reply-To: <799f4d1a-b91d-0404-7ef0-965d123319da@lucaceresoli.net>

Hi Sakari and Luca,
On Sun, Aug 26, 2018 at 10:41:13PM +0200, Luca Ceresoli wrote:
> Hi Sakari,
> 
> On 25/08/2018 16:49, Sakari Ailus wrote:
> > Hi Luca,
> > 
> > On Fri, Aug 24, 2018 at 06:35:21PM +0200, Luca Ceresoli wrote:
> >> Forcibly setting the subdev name to DRIVER_NAME (i.e. "IMX274") makes
> >> it non-unique and less informative.
> >>
> >> Let the driver use the default name from i2c, e.g. "IMX274 2-001a".
> >>
...
> > 
> > This ends up changing the entity as well as the sub-device name which may
> > well break applications.
> 
> Right, unfortunately.
> 
> > On the other hand, you currently can't have more
> > than one of these devices on a media device complex due to the name being
> > specific to a driver, not the device.
> >
> > An option avoiding that would be to let the user choose by e.g. through a
> > Kconfig option would avoid having to address that, but I really hate adding
> > such options.
> 
> I agree adding a Kconfig option just for this would be very annoying.
> However I think the issue affects a few other drivers (sr030pc30.c and
> s5c73m3-core.c apparently), thus maybe one option could serve them all.
> 
> > I wonder what others think. If anyone ever needs to add another on a board
> > so that it ends up being the part of the same media device complex
> > (likely), then changing the name now rather than later would be the least
> > pain. In this case I'd be leaning (slightly) towards accepting the patch
> > and hoping there wouldn't be any fallout... I don't see any board (DT)
> > containing imx274, at least not in the upstream kernel.
> 
> I'll be OK with either decision. Should we keep it as is, then I think a
> comment before that line would be appropriate to clarify it's not
> correct but it is kept for backward userspace compatibility. This would
> help avoid new driver writers doing the same mistake, and prevent other
> people to send another patch like mine.

Would it be acceptable to accept Luca's patch but add a dev_info message
indicating the old and the new name, so that at least if the user notices
a problem he'll find an informative message helping him to fix his config ?
This dev_info message could even be standardized to be usable for other
drivers with only the names changed.

Philippe
-- 
Philippe De Muyter +32 2 6101532 Macq SA rue de l'Aeronef 2 B-1140 Bruxelles

  reply	other threads:[~2018-08-28 12:02 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-24 16:35 [PATCH 0/7] media: imx274: miscellaneous improvements Luca Ceresoli
2018-08-24 16:35 ` [PATCH 1/7] media: imx274: rename IMX274_DEFAULT_MODE to IMX274_DEFAULT_BINNING Luca Ceresoli
2018-08-24 16:35 ` [PATCH 2/7] media: imx274: rearrange sensor startup register tables Luca Ceresoli
2018-08-24 16:35 ` [PATCH 3/7] media: imx274: don't hard-code the subdev name to DRIVER_NAME Luca Ceresoli
2018-08-25 14:49   ` Sakari Ailus
2018-08-26 20:41     ` Luca Ceresoli
2018-08-28  8:11       ` Philippe De Muyter [this message]
2018-08-28  9:22       ` Hans Verkuil
2018-08-28 16:02         ` Philippe De Muyter
2018-08-29 11:07           ` Sakari Ailus
2018-08-29 11:29             ` Philippe De Muyter
2018-08-29 11:38               ` Sakari Ailus
2018-08-29 21:23                 ` Laurent Pinchart
2018-08-30  6:58                   ` Philippe De Muyter
2018-08-30  9:33                     ` Sakari Ailus
2018-08-24 16:35 ` [PATCH 4/7] media: imx274: rename frmfmt and format to "mode" Luca Ceresoli
2018-08-24 16:35 ` [PATCH 5/7] media: imx274: fix error in function docs Luca Ceresoli
2018-08-24 16:35 ` [PATCH 6/7] media: imx274: add helper to read multibyte registers Luca Ceresoli
2018-08-24 16:35 ` [PATCH 7/7] media: imx274: switch to SPDX license identifier Luca Ceresoli

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=20180828081132.GA17946@frolo.macqel \
    --to=phdm@macq.eu \
    --cc=hverkuil@xs4all.nl \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=leonl@leopardimaging.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=luca@lucaceresoli.net \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@iki.fi \
    --cc=sakari.ailus@linux.intel.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