Re: [PATCH V8 1/2] i2c/adapter: Add bus recovery infrastructure

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

 



> >> diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
> >> +/* 10^6/KHz for delay in ns */
> >> +unsigned long clk_delay = DIV_ROUND_UP(1000000, DEFAULT_CLK_RATE * 2);
> >
> > no global variable. should go into the function needing it.
> 
> I kept it to make sure we don't do this calculation every time... I would like
> to keep it for better performance..

Please move it. It is a constant anyhow, and globals are best avoided.

> >> +                     /* work without sda polling */
> >> +                     dev_warn(dev, "can't get sda: %d. Skip sda polling\n",
> >> +                                     bri->sda_gpio);
> >> +                     bri->skip_sda_polling = true;
> >
> > * Instead of above line:
> >         bri->get_sda = get_sda_gpio_value;
> 
> Hmm.. couldn't get this one...
> So, what i understood is, because we don't have skip_sda_polling now, we
> have to choose some other way to say, we don't support sda.. so we can
> mark get_sda as NULL. right?

Yup.

> The other point about getting gpios first and then calling prepare..
> I don't think that would be right thing to do. Suppose we call prepare
> first, which would
> update padmux on the board. At this time gpio may be in output mode and my burn
> our boards. So, its better to get gpios in desired modes and then change muxing.

OK.

Now onto V9...

Regards,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux