Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1669021 > unrolled thread

[PATCH V1] one wire ds1wm patch

Started byJohannes Pöhlmann <johannes.poehlmann@izt-labs.de>
First post2017-06-19 13:50 +0200
Last post2017-06-29 15:40 +0200
Articles 5 — 5 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH V1] one wire ds1wm patch Johannes Pöhlmann <johannes.poehlmann@izt-labs.de> - 2017-06-19 13:50 +0200
    Re: [PATCH V1] one wire ds1wm patch Evgeniy Polyalkov <zbr@ioremap.net> - 2017-06-19 17:00 +0200
      Re: [PATCH V1] one wire ds1wm patch Greg Kroah-Hartman <greg@kroah.com> - 2017-06-19 17:40 +0200
    Re: [PATCH V1] one wire ds1wm patch kbuild test robot <lkp@intel.com> - 2017-06-19 19:40 +0200
    Re: [PATCH v2 0/4] w1: ds1wm: register access patch Evgeniy Polyakov <zbr@ioremap.net> - 2017-06-29 15:40 +0200

#1669021 — [PATCH V1] one wire ds1wm patch

FromJohannes Pöhlmann <johannes.poehlmann@izt-labs.de>
Date2017-06-19 13:50 +0200
Subject[PATCH V1] one wire ds1wm patch
Message-ID<tU3lX-25Y-91@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

To make the ds1wm driver work on a powerpc architecture (big endian, 32bit)
with a register offset multiplier of 4 i had to make some changes to

          drivers/w1/masters/ds1wm.c
and    include/linux/mfd/ds1wm.h.

I grouped theses into 4 patches of falling priority.

[PATCH 1/4] fix and simplify register access
[PATCH 2/4] Add level interrupt modes (maybe no longer needed in newer
kernels)
[PATCH 3/4] Silence interrupts on HW before claiming the interrupt
[PATCH 4/4] optional: add messages to make incorporation in  mfd drivers
easier

The patches applied cleanly against
   commit 32c1431eea4881a6b17bd7c639315010aeefa452
   Author: Linus Torvalds <torvalds@linux-foundation.org>
   Date:   Sun Jun 11 16:48:20 2017 -0700
    Linux 4.12-rc5

I could build the patched kernel (as above) with ds1wm configured in
with no errors or warnings.

I could test and verify the correct working of the patch against
kernel 3.12.15, but not against the current kernel.


[toc] | [next] | [standalone]


#1669166

FromEvgeniy Polyalkov <zbr@ioremap.net>
Date2017-06-19 17:00 +0200
Message-ID<tU6jO-3YD-57@gated-at.bofh.it>
In reply to#1669021
Hi

19.06.2017, 14:38, "Johannes Pöhlmann" <johannes.poehlmann@izt-labs.de>:
> To make the ds1wm driver work on a powerpc architecture (big endian, 32bit)
> with a register offset multiplier of 4 i had to make some changes to
>
>           drivers/w1/masters/ds1wm.c
> and include/linux/mfd/ds1wm.h.
>
> I grouped theses into 4 patches of falling priority.
>
> [PATCH 1/4] fix and simplify register access
> [PATCH 2/4] Add level interrupt modes (maybe no longer needed in newer
> kernels)
> [PATCH 3/4] Silence interrupts on HW before claiming the interrupt
> [PATCH 4/4] optional: add messages to make incorporation in mfd drivers
> easier

Patches look good, thank you.
Greg, please pull them into your tree, is it ok to be sent as attachment?

Acked-by: Evgeniy Polyakov <zbr@ioremap.net>

[toc] | [prev] | [next] | [standalone]


#1669344

FromGreg Kroah-Hartman <greg@kroah.com>
Date2017-06-19 17:40 +0200
Message-ID<tU6Wz-4tx-143@gated-at.bofh.it>
In reply to#1669166
On Mon, Jun 19, 2017 at 05:55:12PM +0300, Evgeniy Polyalkov wrote:
> Hi
> 
> 19.06.2017, 14:38, "Johannes Pöhlmann" <johannes.poehlmann@izt-labs.de>:
> > To make the ds1wm driver work on a powerpc architecture (big endian, 32bit)
> > with a register offset multiplier of 4 i had to make some changes to
> >
> >           drivers/w1/masters/ds1wm.c
> > and include/linux/mfd/ds1wm.h.
> >
> > I grouped theses into 4 patches of falling priority.
> >
> > [PATCH 1/4] fix and simplify register access
> > [PATCH 2/4] Add level interrupt modes (maybe no longer needed in newer
> > kernels)
> > [PATCH 3/4] Silence interrupts on HW before claiming the interrupt
> > [PATCH 4/4] optional: add messages to make incorporation in mfd drivers
> > easier
> 
> Patches look good, thank you.

No they do not, they need to be sent in the correct format, with the
correct signed-off-by, and all of the needed information...

> Greg, please pull them into your tree, is it ok to be sent as attachment?

Not at all.

> Acked-by: Evgeniy Polyakov <zbr@ioremap.net>

Johannes, please fix up and resend and add Evgeniy's acked-by to the
patchs and I will be glad to take them.  Please read
Documentation/SubmittingPatches for the correct format to use.

thanks,

greg k-h

[toc] | [prev] | [next] | [standalone]


#1669540

Fromkbuild test robot <lkp@intel.com>
Date2017-06-19 19:40 +0200
Message-ID<tU8OB-5H3-1@gated-at.bofh.it>
In reply to#1669021

[Multipart message — attachments visible in raw view] — view raw

Hi Johannes,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.12-rc6 next-20170619]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Johannes-P-hlmann/one-wire-ds1wm-patch/20170620-011329
config: x86_64-randconfig-x010-201725 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/w1/masters/ds1wm.c: In function 'ds1wm_write_register':
>> drivers/w1/masters/ds1wm.c:126:4: error: implicit declaration of function 'writew_be' [-Werror=implicit-function-declaration]
       writew_be((u16)val, ds1wm_data->map+(reg<<BUSWIDTH16));
       ^~~~~~~~~
>> drivers/w1/masters/ds1wm.c:129:4: error: implicit declaration of function 'writel_be' [-Werror=implicit-function-declaration]
       writel_be((u32)val, ds1wm_data->map+(reg<<BUSWIDTH32));
       ^~~~~~~~~
   drivers/w1/masters/ds1wm.c: In function 'ds1wm_read_register':
>> drivers/w1/masters/ds1wm.c:165:10: error: implicit declaration of function 'readw_be' [-Werror=implicit-function-declaration]
       val = readw_be(ds1wm_data->map + (reg << BUSWIDTH16));
             ^~~~~~~~
>> drivers/w1/masters/ds1wm.c:168:10: error: implicit declaration of function 'readl_be' [-Werror=implicit-function-declaration]
       val = readl_be(ds1wm_data->map + (reg << BUSWIDTH32));
             ^~~~~~~~
   cc1: some warnings being treated as errors

vim +/writew_be +126 drivers/w1/masters/ds1wm.c

   120		if (ds1wm_data->isHwBigEndian) {
   121			switch (ds1wm_data->bus_shift) {
   122			case BUSWIDTH8:
   123				writeb(val, ds1wm_data->map + (reg << BUSWIDTH8));
   124				break;
   125			case BUSWIDTH16:
 > 126				writew_be((u16)val, ds1wm_data->map+(reg<<BUSWIDTH16));
   127				break;
   128			case BUSWIDTH32:
 > 129				writel_be((u32)val, ds1wm_data->map+(reg<<BUSWIDTH32));
   130				break;
   131			default:
   132			  dev_err(&ds1wm_data->pdev->dev,
   133			  "illegal bus shift %d, not written",
   134			  ds1wm_data->bus_shift);
   135			}
   136		} else {
   137			switch (ds1wm_data->bus_shift) {
   138			case BUSWIDTH8:
   139				writeb(val, ds1wm_data->map + (reg << BUSWIDTH8));
   140				break;
   141			case BUSWIDTH16:
   142				writew((u16) val, ds1wm_data->map+(reg << BUSWIDTH16));
   143				break;
   144			case BUSWIDTH32:
   145				writel((u32) val, ds1wm_data->map+(reg << BUSWIDTH32));
   146				break;
   147			default:
   148			  dev_err(&ds1wm_data->pdev->dev,
   149			  "illegal bus shift %d, not written",
   150			  ds1wm_data->bus_shift);
   151			}
   152		}
   153	}
   154	
   155	static inline u8 ds1wm_read_register(struct ds1wm_data *ds1wm_data, u32 reg)
   156	{
   157	
   158		u32 val = 0;
   159		if (ds1wm_data->isHwBigEndian) {
   160			switch (ds1wm_data->bus_shift) {
   161			case BUSWIDTH8:
   162				val = readb(ds1wm_data->map + (reg << BUSWIDTH8));
   163				break;
   164			case BUSWIDTH16:
 > 165				val = readw_be(ds1wm_data->map + (reg << BUSWIDTH16));
   166				break;
   167			case BUSWIDTH32:
 > 168				val = readl_be(ds1wm_data->map + (reg << BUSWIDTH32));
   169				break;
   170			default:
   171			   dev_err(&ds1wm_data->pdev->dev,

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[toc] | [prev] | [next] | [standalone]


#1677752 — Re: [PATCH v2 0/4] w1: ds1wm: register access patch

FromEvgeniy Polyakov <zbr@ioremap.net>
Date2017-06-29 15:40 +0200
SubjectRe: [PATCH v2 0/4] w1: ds1wm: register access patch
Message-ID<tXHPP-8aI-1@gated-at.bofh.it>
In reply to#1669021
Hi everyone

Greg, please pull this into your tree

23.06.2017, 13:47, "Johannes Poehlmann" <johannes.poehlmann@izt-labs.de>:
> To make the ds1wm driver work on a powerpc architecture (big endian, 32bit)
> with a register offset multiplier of 4 I had to make some changes to
>
>        drivers/w1/masters/ds1wm.c
> and include/linux/mfd/ds1wm.h.
>
> Version 2 of the patchset
>
> o fixes kbuild reported build problems on x86_64
> o removes unobvious shift constants
> o moves shift value checking into the probe function
> o rename variable (fix 'CamelCase' style)
>
> Johannes Poehlmann:
>   w1: ds1wm: fix and simplify register access
>   w1: ds1wm: add level interrupt modes
>   w1: ds1wm: silence interrupts on HW before claiming the interrupt
>   w1: ds1wm: add messages to make incorporation in mfd-drivers easier
>
>  drivers/w1/masters/ds1wm.c | 109 ++++++++++++++++++++++++++++++++++++++++++---
>  include/linux/mfd/ds1wm.h | 9 ++++
>  2 files changed, 111 insertions(+), 7 deletions(-)
>
> --
> 2.1.4

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web