[PATCH] w1: ds2413: fix state byte comparision

2019-05-30 Thread Mariusz Bialonczyk
Dan Carpenter Fixes: 3856032a0628 ("w1: ds2413: when the slave is not responding during read, select it again") Signed-off-by: Mariusz Bialonczyk --- drivers/w1/slaves/w1_ds2413.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/w1/slaves/w1_ds2413.c b/driv

Re: [PATCH 4/4] w1: ds2805: rename w1_family struct, fixing c-p typo

2019-05-25 Thread Mariusz Bialonczyk
On Fri, 24 May 2019 20:21:09 +0200 Greg KH wrote: > On Mon, May 20, 2019 at 09:05:58AM +0200, Mariusz Bialonczyk wrote: > > Signed-off-by: Mariusz Bialonczyk > > --- > > drivers/w1/slaves/w1_ds2805.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-)

[PATCH 4/4 v2] w1: ds2805: rename w1_family struct, fixing c-p typo

2019-05-25 Thread Mariusz Bialonczyk
The ds2805 has a structure named: w1_family_2d, which surely comes from a w1_ds2431 module. This commit fixes this name to prevent confusion and mark a correct family name. Signed-off-by: Mariusz Bialonczyk --- Changes in v2: Added a missing commit msg. drivers/w1/slaves/w1_ds2805.c | 6

[PATCH 3/4 v2] w1: ds2413: when the slave is not responding during read, select it again

2019-05-22 Thread Mariusz Bialonczyk
the problem will persist, instead try selecting (addressing) the slave again. Signed-off-by: Mariusz Bialonczyk --- Changes in v2: Optimize the if statement so the most common is checked first. drivers/w1/slaves/w1_ds2413.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff

[PATCH 3/4] w1: ds2413: when the slave is not responding during read, select it again

2019-05-20 Thread Mariusz Bialonczyk
the problem will persist, instead try selecting (addressing) the slave again. Signed-off-by: Mariusz Bialonczyk --- drivers/w1/slaves/w1_ds2413.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/w1/slaves/w1_ds2413.c b/drivers/w1/slaves/w1_ds2413.c index

[PATCH 1/4] w1: ds2413: output_write() cosmetic fixes / simplify

2019-05-20 Thread Mariusz Bialonczyk
Make the output_write simpler. Based on Jean-Francois Dagenais code from: 49695ac46861 ("w1: ds2408: reset on output_write retry with readback") Signed-off-by: Mariusz Bialonczyk --- drivers/w1/slaves/w1_ds2413.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletion

[PATCH 4/4] w1: ds2805: rename w1_family struct, fixing c-p typo

2019-05-20 Thread Mariusz Bialonczyk
Signed-off-by: Mariusz Bialonczyk --- drivers/w1/slaves/w1_ds2805.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/w1/slaves/w1_ds2805.c b/drivers/w1/slaves/w1_ds2805.c index 29348d283a65..ab349604531a 100644 --- a/drivers/w1/slaves/w1_ds2805.c +++ b/drivers/w1

[PATCH 2/4] w1: ds2413: add retry support to state_read()

2019-05-20 Thread Mariusz Bialonczyk
The state_read() was calling PIO_ACCESS_READ once and bail out if it failed for this first time. This commit is improving this to trying more times before it give up, similarly as the write call is currently doing. Signed-off-by: Mariusz Bialonczyk --- drivers/w1/slaves/w1_ds2413.c | 37

[PATCH v2] w1: ds2408: Fix typo after 49695ac46861 (reset on output_write retry with readback)

2019-05-16 Thread Mariusz Bialonczyk
Fix a typo in commit: 49695ac46861 w1: ds2408: reset on output_write retry with readback Fixes: 49695ac46861 ("w1: ds2408: reset on output_write retry with readback") Reported-by: Phil Elwell Cc: Jean-Francois Dagenais Signed-off-by: Mariusz Bialonczyk --- drivers/w1/slaves/w1_ds

[PATCH] w1: ds2408: Fix typo after 49695ac46861 (reset on output_write retry with readback)

2019-05-16 Thread Mariusz Bialonczyk
Fix a typo in commit: 49695ac46861 w1: ds2408: reset on output_write retry with readback Reported-by: Phil Elwell Cc: Jean-Francois Dagenais Signed-off-by: Mariusz Bialonczyk --- drivers/w1/slaves/w1_ds2408.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/w1

Re: [PATCH v2] w1: ds2408: reset on output_write retry with readback

2019-04-03 Thread Mariusz Bialonczyk
Hi Greg, Exactly as Jean-Francois stated: > Mariusz can chime in but I believe although it was the same exercise > that led to his discoveries, each patch can stand alone and be applied > in any order. > > I will send a v3 without a reply-to-id. Mariusz' patch "[PATCH v2] w1: > fix the resume

Re: [PATCH 1/2] w1: ds2408: add a missing reset when retrying in output_write()

2019-03-21 Thread Mariusz Bialonczyk
suggested). Just drop the following and all will be fine :) Reported-by: Mariusz Bialonczyk Thanks! regards, -- Mariusz Białończyk | xmpp/e-mail: ma...@skyboo.net https://skyboo.net | https://github.com/manio

[PATCH v2] w1: fix the resume command API

2019-03-21 Thread Mariusz Bialonczyk
grated.com/en/ds/DS2408.pdf Signed-off-by: Mariusz Bialonczyk Reviewed-by: Jean-Francois Dagenais --- drivers/w1/w1_io.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/w1/w1_io.c b/drivers/w1/w1_io.c index 0364d3329c52..3516ce6718d9 100644 --- a/drivers/w1/w1_io.c

Re: [PATCH 2/2] w1: fix the resume command API

2019-03-21 Thread Mariusz Bialonczyk
Hi Evgeniy, On Tue, 19 Mar 2019 17:21:09 +0300 Evgeniy Polyakov wrote: > Looks like this may break the search logic, can you check that with this > patch applied > some other single slave device will correctly 'tell' its id and it can be > addressed via match rom (like, basically, just

[PATCH 2/2] w1: fix the resume command API

2019-03-18 Thread Mariusz Bialonczyk
grated.com/en/ds/DS2408.pdf Signed-off-by: Mariusz Bialonczyk Cc: Jean-Francois Dagenais --- drivers/w1/w1_io.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/w1/w1_io.c b/drivers/w1/w1_io.c index 0364d3329c52..4697136b9027 100644 --- a/drivers/w1/w1_io.c

[PATCH 1/2] w1: ds2408: add a missing reset when retrying in output_write()

2019-03-18 Thread Mariusz Bialonczyk
is fixing this, and because we have to reset no matter if the actual write or the readback checking is failing then the resetting is done on the beginning of the loop. Signed-off-by: Mariusz Bialonczyk Cc: Jean-Francois Dagenais --- drivers/w1/slaves/w1_ds2408.c | 13 - 1 file

[PATCH 0/2] w1: DS2408 fixes

2019-03-18 Thread Mariusz Bialonczyk
https://skyboo.net | https://github.com/manio Mariusz Bialonczyk (2): w1: ds2408: add a missing reset when retrying in output_write() w1: fix the resume command API drivers/w1/slaves/w1_ds2408.c | 13 - drivers/w1/w1_io.c| 11 +-- 2 files changed, 17 insertions

[PATCH] w1: ds2482: cosmetic fixes after 54865314f5a1

2019-03-04 Thread Mariusz Bialonczyk
order) by Andrew F. Davis Signed-off-by: Mariusz Bialonczyk Cc: Andrew Worsley Cc: Andrew F. Davis --- drivers/w1/masters/ds2482.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/w1/masters/ds2482.c b/drivers/w1/masters/ds2482.c index 8b5e598ffdb3

[PATCH v2] w1: fix w1_ds2438 documentation

2018-07-04 Thread Mariusz Bialonczyk
The previous documentation was wrongly stating about the order of magnitude of CONVERT_V result files contents (vad, vdd). This commit is correcting this. Reported-by: Adam Stolarczyk Signed-off-by: Mariusz Bialonczyk --- Resending as V2 because it was malformed by mail mail app recently. I

[PATCH v2] w1: fix w1_ds2438 documentation

2018-07-04 Thread Mariusz Bialonczyk
The previous documentation was wrongly stating about the order of magnitude of CONVERT_V result files contents (vad, vdd). This commit is correcting this. Reported-by: Adam Stolarczyk Signed-off-by: Mariusz Bialonczyk --- Resending as V2 because it was malformed by mail mail app recently. I

[PATCH v2 4/4] w1: w1_ds2760.h: fix defines indentation

2017-02-22 Thread Mariusz Bialonczyk
Signed-off-by: Mariusz Bialonczyk <ma...@skyboo.net> --- drivers/w1/slaves/w1_ds2760.h | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/w1/slaves/w1_ds2760.h b/drivers/w1/slaves/w1_ds2760.h index 58e774141568..24168c94eeae 100644 --- a/drivers/w1/

[PATCH v2 4/4] w1: w1_ds2760.h: fix defines indentation

2017-02-22 Thread Mariusz Bialonczyk
Signed-off-by: Mariusz Bialonczyk --- drivers/w1/slaves/w1_ds2760.h | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/w1/slaves/w1_ds2760.h b/drivers/w1/slaves/w1_ds2760.h index 58e774141568..24168c94eeae 100644 --- a/drivers/w1/slaves/w1_ds2760.h +++ b

[PATCH v2 0/4] w1: add DS2438 support, documentation and small fixes

2017-02-22 Thread Mariusz Bialonczyk
(it was splitted accross more functions) 2/ fix defines indentations 3/ added additional patch which fixes the same defines indentation problem in w1_ds2760.h Mariusz Bialonczyk (4): w1: add missing DS2413 documentation w1: add support for DS2438 Smart Battery Monitor w1: add documentation

[PATCH v2 0/4] w1: add DS2438 support, documentation and small fixes

2017-02-22 Thread Mariusz Bialonczyk
(it was splitted accross more functions) 2/ fix defines indentations 3/ added additional patch which fixes the same defines indentation problem in w1_ds2760.h Mariusz Bialonczyk (4): w1: add missing DS2413 documentation w1: add support for DS2438 Smart Battery Monitor w1: add documentation

[PATCH v2 2/4] w1: add support for DS2438 Smart Battery Monitor

2017-02-22 Thread Mariusz Bialonczyk
Detailed information about support and provided sysfs files in my next commit which creates a documentation file: Documentation/w1/slaves/w1_ds2438 Signed-off-by: Mariusz Bialonczyk <ma...@skyboo.net> --- drivers/w1/slaves/Kconfig | 6 + drivers/w1/slaves/Makefile| 1 + driv

[PATCH v2 1/4] w1: add missing DS2413 documentation

2017-02-22 Thread Mariusz Bialonczyk
Signed-off-by: Mariusz Bialonczyk <ma...@skyboo.net> --- Documentation/w1/slaves/00-INDEX | 2 ++ Documentation/w1/slaves/w1_ds2413 | 50 +++ 2 files changed, 52 insertions(+) create mode 100644 Documentation/w1/slaves/w1_ds2413 diff --git a/Documen

[PATCH v2 1/4] w1: add missing DS2413 documentation

2017-02-22 Thread Mariusz Bialonczyk
Signed-off-by: Mariusz Bialonczyk --- Documentation/w1/slaves/00-INDEX | 2 ++ Documentation/w1/slaves/w1_ds2413 | 50 +++ 2 files changed, 52 insertions(+) create mode 100644 Documentation/w1/slaves/w1_ds2413 diff --git a/Documentation/w1/slaves/00-INDEX

[PATCH v2 2/4] w1: add support for DS2438 Smart Battery Monitor

2017-02-22 Thread Mariusz Bialonczyk
Detailed information about support and provided sysfs files in my next commit which creates a documentation file: Documentation/w1/slaves/w1_ds2438 Signed-off-by: Mariusz Bialonczyk --- drivers/w1/slaves/Kconfig | 6 + drivers/w1/slaves/Makefile| 1 + drivers/w1/slaves/w1_ds2438.c

[PATCH v2 3/4] w1: add documentation for w1_ds2438

2017-02-22 Thread Mariusz Bialonczyk
Signed-off-by: Mariusz Bialonczyk <ma...@skyboo.net> --- Documentation/w1/slaves/00-INDEX | 2 ++ Documentation/w1/slaves/w1_ds2438 | 63 +++ 2 files changed, 65 insertions(+) create mode 100644 Documentation/w1/slaves/w1_ds2438 diff --git a/Documen

[PATCH v2 3/4] w1: add documentation for w1_ds2438

2017-02-22 Thread Mariusz Bialonczyk
Signed-off-by: Mariusz Bialonczyk --- Documentation/w1/slaves/00-INDEX | 2 ++ Documentation/w1/slaves/w1_ds2438 | 63 +++ 2 files changed, 65 insertions(+) create mode 100644 Documentation/w1/slaves/w1_ds2438 diff --git a/Documentation/w1/slaves/00-INDEX

Re: [PATCH 1/4] Documentation: w1_therm: clearly state about binary value for precision

2017-02-17 Thread Mariusz Bialonczyk
On Thu, 16 Feb 2017 10:05:36 +0100 Mariusz Bialonczyk <ma...@skyboo.net> wrote: > Signed-off-by: Mariusz Bialonczyk <ma...@skyboo.net> > --- > Documentation/w1/slaves/w1_therm | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/Documentation/w1/slaves/w1_ther

Re: [PATCH 1/4] Documentation: w1_therm: clearly state about binary value for precision

2017-02-17 Thread Mariusz Bialonczyk
On Thu, 16 Feb 2017 10:05:36 +0100 Mariusz Bialonczyk wrote: > Signed-off-by: Mariusz Bialonczyk > --- > Documentation/w1/slaves/w1_therm | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/Documentation/w1/slaves/w1_therm > b/Documentation/w1/slaves/w1_therm >

[PATCH 3/4] w1: add support for DS2438 Smart Battery Monitor

2017-02-16 Thread Mariusz Bialonczyk
Signed-off-by: Mariusz Bialonczyk <ma...@skyboo.net> --- drivers/w1/slaves/Kconfig | 6 + drivers/w1/slaves/Makefile| 1 + drivers/w1/slaves/w1_ds2438.c | 372 ++ drivers/w1/w1_family.h| 1 + 4 files changed, 380 insertions(+)

[PATCH 3/4] w1: add support for DS2438 Smart Battery Monitor

2017-02-16 Thread Mariusz Bialonczyk
Signed-off-by: Mariusz Bialonczyk --- drivers/w1/slaves/Kconfig | 6 + drivers/w1/slaves/Makefile| 1 + drivers/w1/slaves/w1_ds2438.c | 372 ++ drivers/w1/w1_family.h| 1 + 4 files changed, 380 insertions(+) create mode 100644

[PATCH 2/4] w1: add missing DS2413 documentation

2017-02-16 Thread Mariusz Bialonczyk
Signed-off-by: Mariusz Bialonczyk <ma...@skyboo.net> --- Documentation/w1/slaves/00-INDEX | 2 ++ Documentation/w1/slaves/w1_ds2413 | 50 +++ 2 files changed, 52 insertions(+) create mode 100644 Documentation/w1/slaves/w1_ds2413 diff --git a/Documen

[PATCH 2/4] w1: add missing DS2413 documentation

2017-02-16 Thread Mariusz Bialonczyk
Signed-off-by: Mariusz Bialonczyk --- Documentation/w1/slaves/00-INDEX | 2 ++ Documentation/w1/slaves/w1_ds2413 | 50 +++ 2 files changed, 52 insertions(+) create mode 100644 Documentation/w1/slaves/w1_ds2413 diff --git a/Documentation/w1/slaves/00-INDEX

[PATCH 4/4] w1: add documentation for w1_ds2438

2017-02-16 Thread Mariusz Bialonczyk
Signed-off-by: Mariusz Bialonczyk <ma...@skyboo.net> --- Documentation/w1/slaves/00-INDEX | 2 ++ Documentation/w1/slaves/w1_ds2438 | 63 +++ 2 files changed, 65 insertions(+) create mode 100644 Documentation/w1/slaves/w1_ds2438 diff --git a/Documen

[PATCH 4/4] w1: add documentation for w1_ds2438

2017-02-16 Thread Mariusz Bialonczyk
Signed-off-by: Mariusz Bialonczyk --- Documentation/w1/slaves/00-INDEX | 2 ++ Documentation/w1/slaves/w1_ds2438 | 63 +++ 2 files changed, 65 insertions(+) create mode 100644 Documentation/w1/slaves/w1_ds2438 diff --git a/Documentation/w1/slaves/00-INDEX

[PATCH 1/4] Documentation: w1_therm: clearly state about binary value for precision

2017-02-16 Thread Mariusz Bialonczyk
Signed-off-by: Mariusz Bialonczyk <ma...@skyboo.net> --- Documentation/w1/slaves/w1_therm | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/w1/slaves/w1_therm b/Documentation/w1/slaves/w1_therm index d1f93af..e10cd91 100644 --- a/Documentation/w1/slaves/w1_therm

[PATCH 1/4] Documentation: w1_therm: clearly state about binary value for precision

2017-02-16 Thread Mariusz Bialonczyk
Signed-off-by: Mariusz Bialonczyk --- Documentation/w1/slaves/w1_therm | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/w1/slaves/w1_therm b/Documentation/w1/slaves/w1_therm index d1f93af..e10cd91 100644 --- a/Documentation/w1/slaves/w1_therm +++ b/Documentation/w1/slaves

[PATCH] w1: enable active pullup for DS2482 by default

2016-03-29 Thread Mariusz Bialonczyk
This commit enables the active pullup (APU bit) by default for the DS2482 1-Wire master. >From the DS2482 datasheet: "The APU bit controls whether an active pullup (controlled slew-rate transistor) or a passive pullup (Rwpu resistor) will be used to drive a 1-Wire line from low to high. When APU

[PATCH] w1: enable active pullup for DS2482 by default

2016-03-29 Thread Mariusz Bialonczyk
This commit enables the active pullup (APU bit) by default for the DS2482 1-Wire master. >From the DS2482 datasheet: "The APU bit controls whether an active pullup (controlled slew-rate transistor) or a passive pullup (Rwpu resistor) will be used to drive a 1-Wire line from low to high. When APU

[PATCH] w1: add support for DS2413 Dual Channel Addressable Switch

2013-01-01 Thread Mariusz Bialonczyk
Also fixes some whitespace inconsistency in Kconfig and w1_family.h when DS2408 chip support was added. Signed-off-by: Mariusz Bialonczyk --- drivers/w1/slaves/Kconfig | 13 ++- drivers/w1/slaves/Makefile|3 +- drivers/w1/slaves/w1_ds2413.c | 177

[PATCH] w1: add support for DS2413 Dual Channel Addressable Switch

2013-01-01 Thread Mariusz Bialonczyk
Also fixes some whitespace inconsistency in Kconfig and w1_family.h when DS2408 chip support was added. Signed-off-by: Mariusz Bialonczyk ma...@skyboo.net --- drivers/w1/slaves/Kconfig | 13 ++- drivers/w1/slaves/Makefile|3 +- drivers/w1/slaves/w1_ds2413.c | 177