Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1259145
| From | Michael Welling <mwelling@ieee.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3] Input: tsc2005 - Add support for tsc2004 |
| Date | 2015-10-30 02:10 +0100 |
| Message-ID | <qp6mC-7GR-9@gated-at.bofh.it> (permalink) |
| References | (2 earlier) <qoWng-1hg-23@gated-at.bofh.it> <qp3f4-5BD-17@gated-at.bofh.it> <qp3oK-5ES-3@gated-at.bofh.it> <qp3RM-64M-17@gated-at.bofh.it> <qp5Tz-7i3-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Oct 30, 2015 at 09:39:05AM +0900, Mark Brown wrote: > On Thu, Oct 29, 2015 at 03:23:31PM -0700, Dmitry Torokhov wrote: > > > However, you have regmap in the driver core already. Mark, is it > > possible to have regmap API also allow doing raw underlying protocol > > transfer so that consumers could issue command requests without needing > > to know if they need to do it over i2c or spi or whatever. Or we need a > > notion of command registers in regmap... > > I don't think it's a good idea to break the encapsulation of the regmap > and export the raw I/O functionality directly, there seem to be more bad > ways of using that than good. The driver must at some point know what > bus it is dealing with and be able to manage this itself. > > I don't know what "command registers" are. With this device, if the MSB of the first byte of the transaction is 1 then a convertor command is encoded in that byte instead of a register address. So here is my plan: - Add a function pointer for tsc2005_cmd in the struct tsc2005 - Put the spi and i2c tsc2005_cmd versions in their respective drivers - Pass the cmd functions to the core via tsc200x_probe Any objections? Other review suggestions before I code the revision? Am I doing too much with a single patch? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v3] Input: tsc2005 - Add support for tsc2004 kbuild test robot <lkp@intel.com> - 2015-10-29 08:30 +0100
Re: [PATCH v3] Input: tsc2005 - Add support for tsc2004 Michael Welling <mwelling@ieee.org> - 2015-10-29 15:30 +0100
Re: [PATCH v3] Input: tsc2005 - Add support for tsc2004 Arnd Bergmann <arnd@arndb.de> - 2015-10-29 22:50 +0100
Re: [PATCH v3] Input: tsc2005 - Add support for tsc2004 Michael Welling <mwelling@ieee.org> - 2015-10-29 23:00 +0100
Re: [PATCH v3] Input: tsc2005 - Add support for tsc2004 Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2015-10-29 23:30 +0100
Re: [PATCH v3] Input: tsc2005 - Add support for tsc2004 Mark Brown <broonie@kernel.org> - 2015-10-30 01:40 +0100
Re: [PATCH v3] Input: tsc2005 - Add support for tsc2004 Michael Welling <mwelling@ieee.org> - 2015-10-30 02:10 +0100
Re: [PATCH v3] Input: tsc2005 - Add support for tsc2004 Arnd Bergmann <arnd@arndb.de> - 2015-10-30 11:50 +0100
csiph-web