Re: mcp251x: read oscillator frequency?

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

 



On Tue, Nov 12, 2019 at 01:01:29PM -0800, Drew Fustini wrote:
> On Tue, Nov 12, 2019 at 12:44 AM Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> wrote:
> > Several of these properties are not handled by the mainline driver
> > (mcp251x,irq-gpios, mcp251x,stay-awake, mcp251x,oscillator-frequency,
> > mcp251x,enable-clkout). This doesn't have any effect, it just bloats the
> > DT by some bytes.
> >
> > Which kernel are you using?
> 
> I'm using 4.14 kernel on the PocketBeagle:
> https://github.com/beagleboard/linux/blob/4.14/drivers/net/can/spi/mcp251x.c
> 
> I see now that those properties are not in the bindings:
> https://elixir.bootlin.com/linux/v5.4-rc7/source/Documentation/devicetree/bindings/net/can/microchip,mcp251x.txt
> 
> I based the overlay I was using one a MCP2515 overlay for SPI0 on
> BeagleBone Black:
> https://github.com/battlesnake/beaglebone-spi0-mcp2515/blob/master/MCP2515.dts
> 
> I'm not sure where those extra "mcp251x," properties come from since
> the driver does not appear to use them at all.
> 
> I did see the Andy posted this in October:
> 
> [PATCH v2] can: mcp251x: Get rid of legacy platform data
> https://www.spinics.net/lists/linux-can/msg02407.html
> 
> The description:
> Instead of using legacy platform data, switch to use device properties.
> For clock frequency we are using well established clock-frequency property.

Yes. This property is used a lot in other drivers (*). The rule of thumb here
is to use Clock Framework for pure DT boards. The proposed patch relies on the
property to get rid of platform data. The true (but quite big) change should be
to move those two old platforms to use DT entirely.

Besides that, using that property allows to reuse chip on ACPI based platforms.
ACPI doesn't have (yet) proper support of clocks (it assumes that all clocks
are magically configured by onboard firmwares, etc).

(*) `git grep -n -w clock-frequency -- drivers/` shows the current users

> Do you know if that is going upstream?

Marc seems put it to his pending queue.

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux