Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1359229
| From | Lars-Peter Clausen <lars@metafoo.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] iio: add driver for Microchip MCP414X/416X/424X/426X |
| Date | 2016-03-16 19:40 +0100 |
| Message-ID | <rdowp-4gp-3@gated-at.bofh.it> (permalink) |
| References | <rdihk-8te-17@gated-at.bofh.it> <rdiU2-vS-19@gated-at.bofh.it> <rdmuB-2UO-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 03/16/2016 05:25 PM, Slawomir Stepien wrote: > On Mar 16, 2016 13:30, Peter Meerwald-Stadler wrote: [...] >> plenty of the private API, some of which seems to be debug only? >> what is really needed to interact with a poti? > > I wanted to export both the non volatile and volatile memory addresses for wiper > position access. That is bare minimum for the poti to operate. > > But I also wanted to export additional features of this chip. That is way there > is increase and decrease API, and STATUS and TCON register access. > The important part about a framework and the associated device drivers is to expose the features of a device using a standardized interface so you can write generic applications/libraries and share infrastructure. If an application requires device specific knowledge to access the features of a device you may as well write a userspace driver using i2cdev. So when you are introducing new ABI it should at least follow the standard naming scheme. And also try to think whether this is a feature that is present in other similar devices and come up with a device independent way to expose this functionality. Let's start with the simple stuff, I don't really see the advantage of having separate inc/dec controls. This can be handled through the standard raw attribute. If the newly written value is one off from the previous one use inc/dec otherwise write it directly. And even then it might make sense to just ignore that and always write the raw value. > The memory_map API is a way to access all the not used by chip memory addresses. > This API I think could be deleted. But I still think that some people might find > it useful. This sounds more like it should maybe be exposed as a standard EEPROM device.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] iio: add driver for Microchip MCP414X/416X/424X/426X Slawomir Stepien <sst@poczta.fm> - 2016-03-16 13:00 +0100
Re: [PATCH] iio: add driver for Microchip MCP414X/416X/424X/426X Peter Meerwald-Stadler <pmeerw@pmeerw.net> - 2016-03-16 13:40 +0100
Re: [PATCH] iio: add driver for Microchip MCP414X/416X/424X/426X Slawomir Stepien <sst@poczta.fm> - 2016-03-16 17:30 +0100
Re: [PATCH] iio: add driver for Microchip MCP414X/416X/424X/426X Daniel Baluta <daniel.baluta@gmail.com> - 2016-03-16 19:30 +0100
Re: [PATCH] iio: add driver for Microchip MCP414X/416X/424X/426X Slawomir Stepien <sst@poczta.fm> - 2016-03-16 21:10 +0100
Re: [PATCH] iio: add driver for Microchip MCP414X/416X/424X/426X Lars-Peter Clausen <lars@metafoo.de> - 2016-03-16 19:40 +0100
Re: [PATCH] iio: add driver for Microchip MCP414X/416X/424X/426X Slawomir Stepien <sst@poczta.fm> - 2016-03-16 21:10 +0100
csiph-web