On Wed, Dec 19, 2018 at 4:41 AM wrote:
>
> From: Tristram Ha
>
> Add KSZ9477 I2C driver support. The code ksz9477.c and ksz_common.c are
> used together to generate the I2C driver.
>
> Signed-off-by: Tristram Ha
> ---
> v1
> - Return error code from i2c_transfer
> - Change GPL license
> - Chang
On 1/9/19 5:05 PM, Pavel Machek wrote:
> On Wed 2018-12-19 22:50:16, tristram...@microchip.com wrote:
>>> This header file makes no sense. Please move the functions into .c
>>
>> No, that would make code bigger & slower.
>>
>> It makes sense to me. But I'd add "inline" keyword t
On Wed 2018-12-19 22:50:16, tristram...@microchip.com wrote:
> > This header file makes no sense. Please move the functions into .c
> > >>>
> > >>> No, that would make code bigger & slower.
> > >>>
> > >>> It makes sense to me. But I'd add "inline" keyword to make the goal
> > >>> explicit.
>
On 12/21/2018 01:23 PM, Dan Carpenter wrote:
> On Fri, Dec 21, 2018 at 01:14:51PM +0100, Marek Vasut wrote:
>> On 12/21/2018 10:29 AM, Dan Carpenter wrote:
>>> On Wed, Dec 19, 2018 at 10:50:16PM +, tristram...@microchip.com wrote:
So if I change the new code, should I go back to corre
On Fri, Dec 21, 2018 at 01:14:51PM +0100, Marek Vasut wrote:
> On 12/21/2018 10:29 AM, Dan Carpenter wrote:
> > On Wed, Dec 19, 2018 at 10:50:16PM +, tristram...@microchip.com wrote:
> >>
> >> So if I change the new code, should I go back to correct the old code?
> >
> > Other operating system
On 12/21/2018 10:29 AM, Dan Carpenter wrote:
> On Wed, Dec 19, 2018 at 10:50:16PM +, tristram...@microchip.com wrote:
>>
>> So if I change the new code, should I go back to correct the old code?
>
> Other operating systems would worry about breaking code which is working
> fine, but re-writing
On Wed, Dec 19, 2018 at 10:50:16PM +, tristram...@microchip.com wrote:
>
> So if I change the new code, should I go back to correct the old code?
Other operating systems would worry about breaking code which is working
fine, but re-writing ancient code is The Linux Way.
regards,
dan carpenter
On 12/21/2018 01:48 AM, tristram...@microchip.com wrote:
Well, I just did 'git grep regmap_i2c drivers' and 'git grep regmap_spi
drivers/' and found eg.
drivers/iio/pressure/zpa2326_i2c.c
drivers/iio/pressure/zpa2326_spi.c
There's plenty of drivers using regmap in driv
> >> Well, I just did 'git grep regmap_i2c drivers' and 'git grep regmap_spi
> >> drivers/' and found eg.
> >> drivers/iio/pressure/zpa2326_i2c.c
> >> drivers/iio/pressure/zpa2326_spi.c
> >>
> >> There's plenty of drivers using regmap in drivers/ to demonstrate how to
> >> use it. And there's alway
On 12/20/2018 12:31 AM, Marek Vasut wrote:
> On 12/20/2018 12:11 AM, Marek Vasut wrote:
>> On 12/19/2018 11:30 PM, tristram...@microchip.com wrote:
Can this use regmap instead ?
>>>
>>> To tell the truth I do not know how.
>>>
>>> Some customers, like Sergio, seem to be using KSZ9897 with
On 12/20/2018 12:11 AM, Marek Vasut wrote:
> On 12/19/2018 11:30 PM, tristram...@microchip.com wrote:
>>> Can this use regmap instead ?
>>>
>>
>> To tell the truth I do not know how.
>>
>> Some customers, like Sergio, seem to be using KSZ9897 with I2C in their
>> projects
>> and so cannot wait fur
> > Is there any specific reason that ksz_i2c_read24 & ksz_i2c_write24 in
> > ksz9477_i2c.c
> > but, other functions are in ksz_i2c.h?
> >
>
> There are specific registers in KSZ9477 such that using 24-bit is more
> efficient than
> reading 32-bit first and writing 32-bit. The other older switch
On 12/19/2018 11:50 PM, tristram...@microchip.com wrote:
>> This header file makes no sense. Please move the functions into .c
>
> No, that would make code bigger & slower.
>
> It makes sense to me. But I'd add "inline" keyword to make the goal
> explicit.
1) It ma
On 12/19/2018 11:30 PM, tristram...@microchip.com wrote:
>> Can this use regmap instead ?
>>
>
> To tell the truth I do not know how.
>
> Some customers, like Sergio, seem to be using KSZ9897 with I2C in their
> projects
> and so cannot wait further.
Well, I just did 'git grep regmap_i2c driver
> Is there any specific reason that ksz_i2c_read24 & ksz_i2c_write24 in
> ksz9477_i2c.c
> but, other functions are in ksz_i2c.h?
>
There are specific registers in KSZ9477 such that using 24-bit is more
efficient than
reading 32-bit first and writing 32-bit. The other older switches mostly use
> This header file makes no sense. Please move the functions into .c
> >>>
> >>> No, that would make code bigger & slower.
> >>>
> >>> It makes sense to me. But I'd add "inline" keyword to make the goal
> >>> explicit.
> >>
> >> 1) It makes no sense to have header files for things like this. T
> Can this use regmap instead ?
>
To tell the truth I do not know how.
Some customers, like Sergio, seem to be using KSZ9897 with I2C in their projects
and so cannot wait further.
On 12/19/2018 06:22 PM, Pavel Machek wrote:
> On Wed 2018-12-19 17:15:32, Jiri Pirko wrote:
>> Wed, Dec 19, 2018 at 05:08:57PM CET, pa...@denx.de wrote:
>>> Hi!
>>>
> +static int ksz_i2c_write32(struct ksz_device *dev, u32 reg, u32 value)
> +{
> + value = cpu_to_be32(value);
> + ret
On Wed 2018-12-19 17:15:32, Jiri Pirko wrote:
> Wed, Dec 19, 2018 at 05:08:57PM CET, pa...@denx.de wrote:
> >Hi!
> >
> >> >+static int ksz_i2c_write32(struct ksz_device *dev, u32 reg, u32 value)
> >> >+{
> >> >+ value = cpu_to_be32(value);
> >> >+ return ksz_i2c_write(dev, reg, &value, 4);
> >> >+}
From: Pavel Machek
Date: Wed, 19 Dec 2018 17:08:57 +0100
> Hi!
>
>> >+static int ksz_i2c_write32(struct ksz_device *dev, u32 reg, u32 value)
>> >+{
>> >+ value = cpu_to_be32(value);
>> >+ return ksz_i2c_write(dev, reg, &value, 4);
>> >+}
>> >+
>> >+static int ksz_i2c_get(struct ksz_device *d
Wed, Dec 19, 2018 at 05:08:57PM CET, pa...@denx.de wrote:
>Hi!
>
>> >+static int ksz_i2c_write32(struct ksz_device *dev, u32 reg, u32 value)
>> >+{
>> >+ value = cpu_to_be32(value);
>> >+ return ksz_i2c_write(dev, reg, &value, 4);
>> >+}
>> >+
>> >+static int ksz_i2c_get(struct ksz_device *dev,
Hi!
> >+static int ksz_i2c_write32(struct ksz_device *dev, u32 reg, u32 value)
> >+{
> >+value = cpu_to_be32(value);
> >+return ksz_i2c_write(dev, reg, &value, 4);
> >+}
> >+
> >+static int ksz_i2c_get(struct ksz_device *dev, u32 reg, void *data, size_t
> >len)
> >+{
> >+return ksz_i2
Wed, Dec 19, 2018 at 04:41:37AM CET, tristram...@microchip.com wrote:
>From: Tristram Ha
>
>Add KSZ9477 I2C driver support. The code ksz9477.c and ksz_common.c are
>used together to generate the I2C driver.
>
>Signed-off-by: Tristram Ha
>diff --git a/drivers/net/dsa/microchip/ksz_i2c.h
>b/drive
On 12/19/2018 04:41 AM, tristram...@microchip.com wrote:
> From: Tristram Ha
>
> Add KSZ9477 I2C driver support. The code ksz9477.c and ksz_common.c are
> used together to generate the I2C driver.
>
> Signed-off-by: Tristram Ha
Can this use regmap instead ?
--
Best regards,
Marek Vasut
Hi Tristram,
> diff --git a/drivers/net/dsa/microchip/ksz9477_i2c.c
> b/drivers/net/dsa/microchip/ksz9477_i2c.c
> new file mode 100644
> index 000..29511e9
> --- /dev/null
> +++ b/drivers/net/dsa/microchip/ksz9477_i2c.c
..
> +static int ksz_i2c_read24(struct ksz_device *dev, u32 reg, u32 *val)
25 matches
Mail list logo