lkml.org 
[lkml]   [2019]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 7/7] net: phy: realtek: configure RTL8211E LEDs
On Wed, Jul 03, 2019 at 10:10:32PM +0200, Andrew Lunn wrote:
> > + for (i = 0; i < count; i++) {
> > + u32 val;
> > +
> > + of_property_read_u32_index(dev->of_node,
> > + "realtek,led-modes", i, &val);
>
> Please validate the value, 0 - 7.

ok, will be 0-7 and 0x10000 - 0x10007 (w/ RTL8211E_LINK_ACTIVITY) though.

This is the somewhat quirky part about the property, each value
translates to two registers. This seemed to be the cleanest solution
from the bindings perspective, but I'm open to other suggestions.

\
 
 \ /
  Last update: 2019-07-03 22:43    [W:0.092 / U:6.888 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site