* [PATCH 1/2] iio: Documentation: Remove (partially) duplicate line [not found] <20170501111942.12736-1-stefan.bruens@rwth-aachen.de> @ 2017-05-01 11:19 ` Stefan Brüns 2017-05-07 13:40 ` Jonathan Cameron 2017-05-01 11:19 ` [PATCH 2/2] iio: adc: Fix bad GENMASK use, typos, whitespace Stefan Brüns 1 sibling, 1 reply; 5+ messages in thread From: Stefan Brüns @ 2017-05-01 11:19 UTC (permalink / raw) To: linux-iio Cc: linux-kernel, Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler, Marc Titinger, Stefan Brüns Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> --- Documentation/ABI/testing/sysfs-bus-iio-meas-spec | 1 - 1 file changed, 1 deletion(-) diff --git a/Documentation/ABI/testing/sysfs-bus-iio-meas-spec b/Documentation/ABI/testing/sysfs-bus-iio-meas-spec index 1a6265e92e2f..6d47e548eee5 100644 --- a/Documentation/ABI/testing/sysfs-bus-iio-meas-spec +++ b/Documentation/ABI/testing/sysfs-bus-iio-meas-spec @@ -5,4 +5,3 @@ Description: Reading returns either '1' or '0'. '1' means that the battery level supplied to sensor is below 2.25V. This ABI is available for tsys02d, htu21, ms8607 - This ABI is available for htu21, ms8607 -- 2.12.2 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] iio: Documentation: Remove (partially) duplicate line 2017-05-01 11:19 ` [PATCH 1/2] iio: Documentation: Remove (partially) duplicate line Stefan Brüns @ 2017-05-07 13:40 ` Jonathan Cameron 0 siblings, 0 replies; 5+ messages in thread From: Jonathan Cameron @ 2017-05-07 13:40 UTC (permalink / raw) To: Stefan Brüns, linux-iio Cc: linux-kernel, Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler, Marc Titinger On 01/05/17 12:19, Stefan Brüns wrote: > Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Applied. These patches are unconnected so shouldn't really have been sent as a series. Thanks, Jonathan > --- > Documentation/ABI/testing/sysfs-bus-iio-meas-spec | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/Documentation/ABI/testing/sysfs-bus-iio-meas-spec b/Documentation/ABI/testing/sysfs-bus-iio-meas-spec > index 1a6265e92e2f..6d47e548eee5 100644 > --- a/Documentation/ABI/testing/sysfs-bus-iio-meas-spec > +++ b/Documentation/ABI/testing/sysfs-bus-iio-meas-spec > @@ -5,4 +5,3 @@ Description: > Reading returns either '1' or '0'. '1' means that the > battery level supplied to sensor is below 2.25V. > This ABI is available for tsys02d, htu21, ms8607 > - This ABI is available for htu21, ms8607 > ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] iio: adc: Fix bad GENMASK use, typos, whitespace [not found] <20170501111942.12736-1-stefan.bruens@rwth-aachen.de> 2017-05-01 11:19 ` [PATCH 1/2] iio: Documentation: Remove (partially) duplicate line Stefan Brüns @ 2017-05-01 11:19 ` Stefan Brüns 2017-05-02 20:06 ` Andrew F. Davis 1 sibling, 1 reply; 5+ messages in thread From: Stefan Brüns @ 2017-05-01 11:19 UTC (permalink / raw) To: linux-iio Cc: linux-kernel, Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler, Marc Titinger, Stefan Brüns Commit 7906dd52c5a0 ("iio: ina2xx: Fix whitespace and re-order code") changed the register number of the MASK_ENABLE register from 0x06 to the value equivalent GENMASK(2,1), although its no mask. Also fix a typo (INA2_6_6 instead of INA2_2_6), and use the datasheet name ("Mask/Enable") for the register number define. Fix bad indentation for channel attributes. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> --- drivers/iio/adc/ina2xx-adc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/iio/adc/ina2xx-adc.c b/drivers/iio/adc/ina2xx-adc.c index 3263231276ca..f395101d68d7 100644 --- a/drivers/iio/adc/ina2xx-adc.c +++ b/drivers/iio/adc/ina2xx-adc.c @@ -41,8 +41,8 @@ #define INA2XX_CURRENT 0x04 /* readonly */ #define INA2XX_CALIBRATION 0x05 -#define INA226_ALERT_MASK GENMASK(2, 1) -#define INA266_CVRF BIT(3) +#define INA226_MASK_ENABLE 0x06 +#define INA226_CVRF BIT(3) #define INA2XX_MAX_REGISTERS 8 @@ -416,8 +416,8 @@ static ssize_t ina2xx_shunt_resistor_store(struct device *dev, .address = (_address), \ .indexed = 1, \ .channel = (_index), \ - .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) \ - | BIT(IIO_CHAN_INFO_SCALE), \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ + BIT(IIO_CHAN_INFO_SCALE), \ .info_mask_shared_by_dir = BIT(IIO_CHAN_INFO_SAMP_FREQ) | \ BIT(IIO_CHAN_INFO_OVERSAMPLING_RATIO), \ .scan_index = (_index), \ @@ -480,12 +480,12 @@ static int ina2xx_work_buffer(struct iio_dev *indio_dev) */ if (!chip->allow_async_readout) do { - ret = regmap_read(chip->regmap, INA226_ALERT_MASK, + ret = regmap_read(chip->regmap, INA226_MASK_ENABLE, &alert); if (ret < 0) return ret; - alert &= INA266_CVRF; + alert &= INA226_CVRF; } while (!alert); /* -- 2.12.2 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] iio: adc: Fix bad GENMASK use, typos, whitespace 2017-05-01 11:19 ` [PATCH 2/2] iio: adc: Fix bad GENMASK use, typos, whitespace Stefan Brüns @ 2017-05-02 20:06 ` Andrew F. Davis 2017-05-07 13:42 ` Jonathan Cameron 0 siblings, 1 reply; 5+ messages in thread From: Andrew F. Davis @ 2017-05-02 20:06 UTC (permalink / raw) To: Stefan Brüns, linux-iio Cc: linux-kernel, Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler, Marc Titinger On 05/01/2017 06:19 AM, Stefan Brüns wrote: > Commit 7906dd52c5a0 ("iio: ina2xx: Fix whitespace and re-order code") > changed the register number of the MASK_ENABLE register from 0x06 to the > value equivalent GENMASK(2,1), although its no mask. > Also fix a typo (INA2_6_6 instead of INA2_2_6), and use the datasheet > name ("Mask/Enable") for the register number define. > Fix bad indentation for channel attributes. > > Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> > --- Good catches, Acked-by: Andrew F. Davis <afd@ti.com> > drivers/iio/adc/ina2xx-adc.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/iio/adc/ina2xx-adc.c b/drivers/iio/adc/ina2xx-adc.c > index 3263231276ca..f395101d68d7 100644 > --- a/drivers/iio/adc/ina2xx-adc.c > +++ b/drivers/iio/adc/ina2xx-adc.c > @@ -41,8 +41,8 @@ > #define INA2XX_CURRENT 0x04 /* readonly */ > #define INA2XX_CALIBRATION 0x05 > > -#define INA226_ALERT_MASK GENMASK(2, 1) > -#define INA266_CVRF BIT(3) > +#define INA226_MASK_ENABLE 0x06 > +#define INA226_CVRF BIT(3) > > #define INA2XX_MAX_REGISTERS 8 > > @@ -416,8 +416,8 @@ static ssize_t ina2xx_shunt_resistor_store(struct device *dev, > .address = (_address), \ > .indexed = 1, \ > .channel = (_index), \ > - .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) \ > - | BIT(IIO_CHAN_INFO_SCALE), \ > + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ > + BIT(IIO_CHAN_INFO_SCALE), \ > .info_mask_shared_by_dir = BIT(IIO_CHAN_INFO_SAMP_FREQ) | \ > BIT(IIO_CHAN_INFO_OVERSAMPLING_RATIO), \ > .scan_index = (_index), \ > @@ -480,12 +480,12 @@ static int ina2xx_work_buffer(struct iio_dev *indio_dev) > */ > if (!chip->allow_async_readout) > do { > - ret = regmap_read(chip->regmap, INA226_ALERT_MASK, > + ret = regmap_read(chip->regmap, INA226_MASK_ENABLE, > &alert); > if (ret < 0) > return ret; > > - alert &= INA266_CVRF; > + alert &= INA226_CVRF; > } while (!alert); > > /* > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] iio: adc: Fix bad GENMASK use, typos, whitespace 2017-05-02 20:06 ` Andrew F. Davis @ 2017-05-07 13:42 ` Jonathan Cameron 0 siblings, 0 replies; 5+ messages in thread From: Jonathan Cameron @ 2017-05-07 13:42 UTC (permalink / raw) To: Andrew F. Davis, Stefan Brüns, linux-iio Cc: linux-kernel, Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler, Marc Titinger On 02/05/17 21:06, Andrew F. Davis wrote: > On 05/01/2017 06:19 AM, Stefan Brüns wrote: >> Commit 7906dd52c5a0 ("iio: ina2xx: Fix whitespace and re-order code") >> changed the register number of the MASK_ENABLE register from 0x06 to the >> value equivalent GENMASK(2,1), although its no mask. >> Also fix a typo (INA2_6_6 instead of INA2_2_6), and use the datasheet >> name ("Mask/Enable") for the register number define. >> Fix bad indentation for channel attributes. >> >> Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> >> --- > > Good catches, > > Acked-by: Andrew F. Davis <afd@ti.com> Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to play with it. Thanks, Jonathan > >> drivers/iio/adc/ina2xx-adc.c | 12 ++++++------ >> 1 file changed, 6 insertions(+), 6 deletions(-) >> >> diff --git a/drivers/iio/adc/ina2xx-adc.c b/drivers/iio/adc/ina2xx-adc.c >> index 3263231276ca..f395101d68d7 100644 >> --- a/drivers/iio/adc/ina2xx-adc.c >> +++ b/drivers/iio/adc/ina2xx-adc.c >> @@ -41,8 +41,8 @@ >> #define INA2XX_CURRENT 0x04 /* readonly */ >> #define INA2XX_CALIBRATION 0x05 >> >> -#define INA226_ALERT_MASK GENMASK(2, 1) >> -#define INA266_CVRF BIT(3) >> +#define INA226_MASK_ENABLE 0x06 >> +#define INA226_CVRF BIT(3) >> >> #define INA2XX_MAX_REGISTERS 8 >> >> @@ -416,8 +416,8 @@ static ssize_t ina2xx_shunt_resistor_store(struct device *dev, >> .address = (_address), \ >> .indexed = 1, \ >> .channel = (_index), \ >> - .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) \ >> - | BIT(IIO_CHAN_INFO_SCALE), \ >> + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ >> + BIT(IIO_CHAN_INFO_SCALE), \ >> .info_mask_shared_by_dir = BIT(IIO_CHAN_INFO_SAMP_FREQ) | \ >> BIT(IIO_CHAN_INFO_OVERSAMPLING_RATIO), \ >> .scan_index = (_index), \ >> @@ -480,12 +480,12 @@ static int ina2xx_work_buffer(struct iio_dev *indio_dev) >> */ >> if (!chip->allow_async_readout) >> do { >> - ret = regmap_read(chip->regmap, INA226_ALERT_MASK, >> + ret = regmap_read(chip->regmap, INA226_MASK_ENABLE, >> &alert); >> if (ret < 0) >> return ret; >> >> - alert &= INA266_CVRF; >> + alert &= INA226_CVRF; >> } while (!alert); >> >> /* >> > -- > To unsubscribe from this list: send the line "unsubscribe linux-iio" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-05-07 22:01 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <20170501111942.12736-1-stefan.bruens@rwth-aachen.de> 2017-05-01 11:19 ` [PATCH 1/2] iio: Documentation: Remove (partially) duplicate line Stefan Brüns 2017-05-07 13:40 ` Jonathan Cameron 2017-05-01 11:19 ` [PATCH 2/2] iio: adc: Fix bad GENMASK use, typos, whitespace Stefan Brüns 2017-05-02 20:06 ` Andrew F. Davis 2017-05-07 13:42 ` Jonathan Cameron
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).