Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3891820imm; Mon, 4 Jun 2018 10:59:10 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJKMZi4yCFdNjVfIMnAjT8Gt7iqTGJUlAJRdlFgT9X0l2zHqnJycYhd5e/9kZ4gB2arCo1D X-Received: by 2002:a62:3e9a:: with SMTP id y26-v6mr22161718pfj.98.1528135150851; Mon, 04 Jun 2018 10:59:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528135150; cv=none; d=google.com; s=arc-20160816; b=CQPPqe+nmwKGAWf/jnGjbsdp2QgqMkhOpUT2PkoXnUM5/rq68cSjt5WK1byV5wgvgu as/KpGaPjATIWCIVDOmTkXNv4q+4mkJkS7hZHt9jWDtk6JrjZYjZ7gPyPMyQjoRJAOjp YbJH/B0E9wWxLoe8SBXnMnwn5P/rCmALusNzkoW6AQmJGqkdHJPuCVoUWfM/BqMilGeG tQVBVHS3+tQd8ZQH2hV9Tw0ch7YvJHvGn0tGtH+4Y3x8hdm9NDS5RoxwEBg37M04Nxmq GfC2a8pB59OBJ8/MPWcHSKyVRs/1LR2gZ7i3arW/oFpRzYXz2NaFp9NkguP6O0kAZGlz 21Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=3k5i+zc3VT6kATUDN17BU43N6Q2cTszEIUfx+v7R4tU=; b=vFI22gQKZ7bkjJ4ZZOizP5Cd4hbx8MGDftK1XbVtm7F5lneJUP/pusyTnSseumepbC 8vyqo3E4PF24XdvlzNL6wSSZ2T49yIROeSq+py4uDkFjnnZFzMpzQo3U2KzCp1i8o24r 0u4cCj3Tupd4/xKPVi1kGsu1+A7ANY57TF6O6ujrNf2ah5xse42PL+FP0jYEyu0TxQEd nWDjLMJGwgy03FsdoJDu2azjMNAPJOv36yzuc8JSSsDyy2z0l4oRw+EhTIjCWW83vmf4 kU+vuiWro3l3T7WCppDAfZTAYE7jMbtk7CvHCQySjlIJpMSWAcQFUULL9AnWRyVqkkl0 +yAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sYZbTEnE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a80-v6si11763598pfg.200.2018.06.04.10.58.55; Mon, 04 Jun 2018 10:59:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sYZbTEnE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752109AbeFDR6K (ORCPT + 99 others); Mon, 4 Jun 2018 13:58:10 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:40954 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751228AbeFDR5D (ORCPT ); Mon, 4 Jun 2018 13:57:03 -0400 Received: by mail-wr0-f196.google.com with SMTP id l41-v6so45127012wre.7; Mon, 04 Jun 2018 10:57:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=3k5i+zc3VT6kATUDN17BU43N6Q2cTszEIUfx+v7R4tU=; b=sYZbTEnEjPXtCWe0GuM+Pc3WVIpZsj2+nyMePetCY9HTtwjBOdRSN66LRxo4F9wObJ xFbYa5in2OqGWrP0wP8ArcmihCD2MOKijXI65CUvxNu6lELYvV9lsAd/UmwNObjzaVGV cyjOvwPXTFrCYeZkbD+WgMYytS6tn6+JPBLzjMIzu+ap5EgkyDfa2MfJOOT5QOq6neDj D+M8jn1rcgluIEq/roVVfS64UEVm4KtE0ePS8oRGfe4KyuFVfkuNIYZEADbg0RV3EXVy HRAs6gWaCph0Xo/j3opQkhgI/UhdbkSsGykL3c9CbYwYO2Zs9qd/zeHiMF7lMRo3YV+r V98A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=3k5i+zc3VT6kATUDN17BU43N6Q2cTszEIUfx+v7R4tU=; b=UL0YyaPO7CijHGSHqfrj7EcaXKHYAg1UqiS/YsaeUb2hdMx1f3BF4Xu1gqJLgn43Lk XQUUbebpthNCn172qb3cBfPYKbtCPHUnBhKUHU0nfsKoUYFqkdLZR8vydxLRCC/rEJjm 9Rim6IdK+8AGPlNGLf2nhevvRzQuYrAEyeAgPsD7h3qcz3kafQopT450F7unJLDyaw3t EuL4SKFYY2T27KXa2wZSY4N+JUD2NHuLqFc1BkABHxP8B/wztcucBLF9RcxPkeDGj9vB 85hdH4GmRDx+mCNfjMAlQl1njRKbUQav/qeL/SWsATeI/IVzHwFPJeFETs294o+HQ/5q kE+Q== X-Gm-Message-State: ALKqPwffWVwgJ2aOeuAoVi0QEaJ6Hf/dfd/Yb6ZjBbTuDydVIxmpt+s3 V4L0X6Nt4SX9W0Ha1a7e4JiBhjto X-Received: by 2002:adf:c907:: with SMTP id m7-v6mr14754739wrh.6.1528135021592; Mon, 04 Jun 2018 10:57:01 -0700 (PDT) Received: from [192.168.1.4] (ip-86-49-107-50.net.upcbroadband.cz. [86.49.107.50]) by smtp.gmail.com with ESMTPSA id a203-v6sm819938wme.46.2018.06.04.10.57.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Jun 2018 10:57:00 -0700 (PDT) Subject: Re: [PATCH v3 02/10] mfd: da9063: Use REGMAP_IRQ_REG To: Lee Jones Cc: linux-kernel@vger.kernel.org, Marek Vasut , Geert Uytterhoeven , Mark Brown , Steve Twiss , Wolfram Sang , linux-renesas-soc@vger.kernel.org References: <20180602101155.26375-1-marek.vasut+renesas@gmail.com> <20180602101155.26375-2-marek.vasut+renesas@gmail.com> <20180604122624.GB21163@dell> From: Marek Vasut Message-ID: Date: Mon, 4 Jun 2018 18:23:59 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180604122624.GB21163@dell> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/04/2018 02:26 PM, Lee Jones wrote: > On Sat, 02 Jun 2018, Marek Vasut wrote: > >> Convert the regmap_irq table to use REGMAP_IRQ_REG(). >> >> Signed-off-by: Marek Vasut >> Cc: Geert Uytterhoeven >> Cc: Lee Jones >> Cc: Mark Brown >> Cc: Steve Twiss >> Cc: Wolfram Sang >> Cc: linux-renesas-soc@vger.kernel.org >> --- >> V3: New patch >> Note: A sed oneliner was used: >> sed -i "/\[DA9063_IRQ_/ {N;N;N;s/\n//g;s/.*\[\(DA9063_IRQ_[^]]\+\)].*reg_offset = \([^,]\+\),.* = \([^,]\+\),.*/\tREGMAP_IRQ_REG(\1, \2, \3),/}" drivers/mfd/da9063-irq.c >> --- >> drivers/mfd/da9063-irq.c | 145 ++++++++++------------------------------------- >> 1 file changed, 29 insertions(+), 116 deletions(-) >> >> diff --git a/drivers/mfd/da9063-irq.c b/drivers/mfd/da9063-irq.c >> index 207bbfe55449..5b406ecfc14a 100644 >> --- a/drivers/mfd/da9063-irq.c >> +++ b/drivers/mfd/da9063-irq.c >> @@ -28,125 +28,38 @@ >> >> static const struct regmap_irq da9063_irqs[] = { >> /* DA9063 event A register */ >> - [DA9063_IRQ_ONKEY] = { >> - .reg_offset = DA9063_REG_EVENT_A_OFFSET, >> - .mask = DA9063_M_ONKEY, >> - }, >> - [DA9063_IRQ_ALARM] = { >> - .reg_offset = DA9063_REG_EVENT_A_OFFSET, >> - .mask = DA9063_M_ALARM, >> - }, >> - [DA9063_IRQ_TICK] = { >> - .reg_offset = DA9063_REG_EVENT_A_OFFSET, >> - .mask = DA9063_M_TICK, >> - }, >> - [DA9063_IRQ_ADC_RDY] = { >> - .reg_offset = DA9063_REG_EVENT_A_OFFSET, >> - .mask = DA9063_M_ADC_RDY, >> - }, >> - [DA9063_IRQ_SEQ_RDY] = { >> - .reg_offset = DA9063_REG_EVENT_A_OFFSET, >> - .mask = DA9063_M_SEQ_RDY, >> - }, >> + REGMAP_IRQ_REG(DA9063_IRQ_ONKEY, DA9063_REG_EVENT_A_OFFSET, DA9063_M_ONKEY), >> + REGMAP_IRQ_REG(DA9063_IRQ_ALARM, DA9063_REG_EVENT_A_OFFSET, DA9063_M_ALARM), >> + REGMAP_IRQ_REG(DA9063_IRQ_TICK, DA9063_REG_EVENT_A_OFFSET, DA9063_M_TICK), >> + REGMAP_IRQ_REG(DA9063_IRQ_ADC_RDY, DA9063_REG_EVENT_A_OFFSET, DA9063_M_ADC_RDY), >> + REGMAP_IRQ_REG(DA9063_IRQ_SEQ_RDY, DA9063_REG_EVENT_A_OFFSET, DA9063_M_SEQ_RDY), > > Nice, but I think checkpatch.pl would complain. > > Better to break after the first argument I think. Doesn't really help the readability, but done. -- Best regards, Marek Vasut