Re: [PATCH v2 07/11] media: i2c: Add support for new frequencies to ov7251

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 28, 2022 at 01:55:31PM +0200, Andy Shevchenko wrote:
> On Fri, Feb 25, 2022 at 10:04:29PM +0000, Daniel Scally wrote:
> > On 25/02/2022 17:09, Andy Shevchenko wrote:
> > > On Fri, Feb 25, 2022 at 12:07:49AM +0000, Daniel Scally wrote:
> 
> ...
> 
> > > >   	/* get system clock (xclk) */
> > > > -	ov7251->xclk = devm_clk_get(dev, "xclk");
> > > > +	ov7251->xclk = devm_clk_get(dev, NULL);
> > > Why a clock doesn't have a name anymore?
> > > Shouldn't you rather switch to _optional()?
> > 
> > The problem is since we could have a the clock coming from some dt file with
> > it named xclk, as this driver is obviously designed for, but it also can be
> > created by the int3472-tps68470 or int3472-discrete drivers which don't use
> > that name. Without knowing what it's called, best thing I could think to do
> > was remove the name and rely on device matching.
> 
> So, then the Q is why it's not called the same in the other drivers?

FWIW, most sensor drivers use NULL for the name as there's just a single
clock. This one is rather an exception. Existing DT should continue to just
work as well as not specifying the name gives you the first one.

The name could be removed frem the bindings IMO.

-- 
Sakari Ailus



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux