Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1721731
| From | Wolfram Sang <wsa@the-dreams.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RESEND PATCH v4 2/2] i2c: Add Spreadtrum I2C controller driver |
| Date | 2017-08-28 17:20 +0200 |
| Message-ID | <ujtZw-7cf-9@gated-at.bofh.it> (permalink) |
| References | <u34LL-1gd-3@gated-at.bofh.it> <u34LM-1gd-23@gated-at.bofh.it> <uj7Pk-16w-27@gated-at.bofh.it> <ujiUp-f2-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
> >> + /* > >> + * If we did not get one ACK from slave when writing data, we should > >> + * dump all registers to check I2C status. > > > > Why? I would say no. NACK from a slave can always happen, e.g. when an > > EEPROM is busy erasing a page. > > For our I2C controller databook, if the master did not get one ACK > from slave when writing data to salve, we should send one STOP signal > to abort this data transfer or generate one repeated START signal to > start one new data transfer cycle. Considering our I2C usage Yes, so far so good. > scenarios, we should dump registers to analyze I2C status and notify > to user to re-start new data transfer. I disagree here. You notify the users by returning -EIO. The upper layer (e.g. the i2c client driver) will handle it, like the EEPROM driver might retry after a while. This all is expected behaviour, so no need to print the registers to the logfile. If you really, really want to keep it, make it debug output. But I think the sentence "we should dump all registers" needs to be rephrased. > As I explained before, in our Spreadtrum platform, our regulator > driver will depend on I2C driver and the regulator driver uses > subsys_initcall() level to initialize. Moreover some other drivers > like GPU, they will depend on regulator to set voltage and they also > need initialization much earlier. > > Since it is arch_initcall() level, Andy suggested I should get rid of > tristate (use bool) and drop module.h here and all leftovers like > MODULE_*() calls including module_exit(). I see. So the driver is really so essential for proper bootup that it is not even allowed to be unloaded. I might make an exception here and allow arch_initcall() then. But I do wonder: did you try deferred probing all over the place?
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [RESEND PATCH v4 2/2] i2c: Add Spreadtrum I2C controller driver Wolfram Sang <wsa@the-dreams.de> - 2017-08-27 17:40 +0200
Re: [RESEND PATCH v4 2/2] i2c: Add Spreadtrum I2C controller driver Baolin Wang <baolin.wang@linaro.org> - 2017-08-28 05:30 +0200
Re: [RESEND PATCH v4 2/2] i2c: Add Spreadtrum I2C controller driver Wolfram Sang <wsa@the-dreams.de> - 2017-08-28 17:20 +0200
Re: [RESEND PATCH v4 2/2] i2c: Add Spreadtrum I2C controller driver Baolin Wang <baolin.wang@linaro.org> - 2017-08-29 04:00 +0200
csiph-web