Hi Tristam,

On Tue, Dec 18, 2018 at 5:16 AM <tristram...@microchip.com> wrote:
>
> Sorry about the patch.  I know you were using the code from the new SPI and 
> old I2C drivers to come up with your patch.  You can incorporate the changes 
> and test the driver and re-submit the patch if you want.

For me is ok to just use the driver you have just submitted, there is
no need to me to resend anything, I think. I only wanted an i2c driver
for this switch and because there wasn't one I just sent my patches
:-).

>
> Your i2c_probe function displays an error message when 
> ksz9477_switch_register is not successful.  It is likely the error code is 
> from the dsa_register_switch function when the core DSA driver is not loaded 
> yet.
>
> All the register access functions in ksz_io_ops structure will be called by 
> the driver code.  The length should always be non-zero.  The set and get 
> functions can be invoked by the standard kernel register access API, which is 
> called in user space.  The functions that handle this API make sure the 
> length is non-zero before continuing.  For switches with simple register set 
> the get function can dump all registers in one call.
>
> I am not sure this register access API is allowed anymore as this may create 
> a security hole in the kernel, but it helps greatly during development and 
> testing as the driver is quite opaque to display the hardware state when 
> something is wrong.
>
> A little out-of-topic is the modalias now returns a different string rather 
> than "i2c:ksz9477."  This is done with the "cat 
> /sys/bus/i2c/devices/0-005f/modalias" command.  The string looks legit but it 
> is difficult for regular users to get anything from it.
>

Thanks for clarification.

Best regards,
    Sergio Paracuellos

Reply via email to