Re: mcp251x: read oscillator frequency?

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

 



The out-of-tree DTS in question was developed quickly and lazily for
getting CAN working on a prototype, where the MCU's built-in CAN had
not been routed correctly (so I added an MCP251x via SPI for testing).
It was a one-off fix for a problem that no longer exists, for hardware
which no longer exists.  Probably not the best approach to fix the
problem either.

I shared the DTS to help others at the time who might be using the
same part with similar kernel versions (~4.9?) and out-of-tree mcp2515
driver.
There is an driver available in-tree, with documentation of DTS
properties at linux://Documentation/devicetree/bindings/net/can/microchip,mcp251x.txt

I don't care about that out-of-tree MCP2515 DTS any more, the kernel
developers certainly shouldn't care about it, and neither should
anyone else.

-- Mark Kuckian Cowan

On Wed, 13 Nov 2019 at 11:19, andriy.shevchenko@xxxxxxxxx
<andriy.shevchenko@xxxxxxxxx> wrote:
>
> On Tue, Nov 12, 2019 at 01:15:26PM -0800, Drew Fustini wrote:
> > On Tue, Nov 12, 2019 at 1:01 PM Drew Fustini <pdp7pdp7@xxxxxxxxx> wrote:
> > > 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 searched for "mcp251x,oscillator-frequency" on google and found this
> > old patch by Alessandro Zummo <a.zummo@xxxxxxxxxxxx>:
> > https://github.com/beagleboard/meta-beagleboard/blob/master/common-bsp/recipes-kernel/linux/linux-mainline-3.8/net/0006-mcp251x-add-device-tree-support.patch
> >
> > It does read some of those properties:
> > + of_property_read_u32(np, "mcp251x,oscillator-frequency", &tmp);
> > + pd->stay_awake = of_property_read_bool(np, "mcp251x,stay-awake");
> > + pd->enable_clkout = of_property_read_bool(np, "mcp251x,enable-clkout");
>
> > Maybe there are people using this out of tree patch still and
> > therefore including those properties like Mark K Cowan did in:
> > https://github.com/beagleboard/bb.org-overlays/blob/master/src/arm/MCP2515-SPI0.dts
>
> First of all, there are rules (which are getting stricter all the time) about
> property names and use in DT. Second, no one cares about out-of-tree
> customizations. In kernel we consider no regression made if we introduce
> properties that are not compatible with no-one-knows DTSes (it didn't work
> with older kernel, it continue not working with new — status quo).
>
> --
> 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