Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4058117imu; Mon, 28 Jan 2019 16:25:48 -0800 (PST) X-Google-Smtp-Source: ALg8bN4m/OlbxicA/m6LhZGRXJbOqyqN/CN3Vc8j/tMaUX69ALO/9+wuzlkBfbTRSCk91M9rzAH6 X-Received: by 2002:a17:902:9897:: with SMTP id s23mr22882837plp.69.1548721548873; Mon, 28 Jan 2019 16:25:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548721548; cv=none; d=google.com; s=arc-20160816; b=PlJytMJQgL01vdsgWCseqnED4KISRFbi15iQQWMt0NDV/WttmXTZnXIX87HfyTQTGu CR+GCBiMAuAoa88H2L/U/fQ1wVLFs05xKA//e8vQeCktrT5ICEVN5OVFmHxeJqmxcywN pfTEvLL5gLN4igt/NdMF8ris9gGiw0EIMnF1nyv8KSCoVz77R27morcH5O8p0TglQ//W pR4miPDT4lvGAPrPKBrMhD35nJDMlvgBP7Q7c225obqAznTMvOwXFiP75pOhyrJGZ7Hn hmVzb7GYfs3DAqeTAki4UuxT7LDZFqKuGfew7sctKkOJWfMc4K7AwFcZtR5158w4AiCc A1jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=zuMTD7i3DPkolHvTelq1ypV2FTV33mbaMeF7pJE/ifg=; b=Jd6ejh+bMPWxkBKszlthMcDf8wNJPalznT4ZI38ad0ZCP/SaIV0LksNUjCI+aJIdBX N67uRG6zlKSEMHxkjbg/LjmAl9QnxIRueVf6VVsQQBscZ18e/mwFd2iurW27Ffkz+4UX 5okyQlhY23WqeJ5A1aQlp+6zMvOFWyDcq6yUFGjVUP2qtgq8h96+d9SiPwza+P8b7xNZ ib2BgTV4w7RbHePXoyUXMknxScrZTjNMVQzAwHMgzWiywbvnu6g4EmfAVOSEwOXR3x6K Ll5P3yc7K5NOhyJf5huwEgduwZpk/9S9SeAspsyZ/lwtkmfnDS+7YyIA8y/lJ/6j2oty FHag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EFWy4rBW; 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 a17si8276404pfn.213.2019.01.28.16.25.31; Mon, 28 Jan 2019 16:25:48 -0800 (PST) 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=EFWy4rBW; 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 S1727050AbfA2AZW (ORCPT + 99 others); Mon, 28 Jan 2019 19:25:22 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:37367 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726874AbfA2AZW (ORCPT ); Mon, 28 Jan 2019 19:25:22 -0500 Received: by mail-pg1-f193.google.com with SMTP id c25so7957608pgb.4; Mon, 28 Jan 2019 16:25:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=zuMTD7i3DPkolHvTelq1ypV2FTV33mbaMeF7pJE/ifg=; b=EFWy4rBWDq+u6NPT9mOPTSNspPt7122l91jUcujP3gYExTiAuSUEYzk8FdA6/ounhB 5IahCb4Ne9Pq4zu4Bt0UcXvmfAEPmme2E1caVSMZbFELDG5h6w70F2We1sLyP/W5qU2Q FLbUlTfuLzFhIfR/jTRVXs+6PYWsiypzGwGPEhhV20RymdESHypjOYHzsfN6K/ZUALFV F8rl9PsZ+RymmK3+GdPLB79OPwWo8VjVWLWd7oL4d+EOeUCMiHPeuhomAHLAANveIXZt 5bwvY0HaVbU7ODu0WHwnrVTePB0z3d5Gk6dr+v+ZW2RnJPIy5g53f6P9Kvo1xGIV6yA9 Qjyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=zuMTD7i3DPkolHvTelq1ypV2FTV33mbaMeF7pJE/ifg=; b=MzidgjSKwdXD5EiJkMguS/kc22qGDx3abphMQXN8XwqySfpkZ5vu6K2F7GSdhzaEGu YLd80Pbd8MUodaPmGjeeTv4dvW/7nMWVtbA3uWTwL1Hf8QYb22xB5kEF7ovJJWrmGLAA Hb5Jm4AS47YcSYOqpbwZPuJT95HVcyZWLmMUStFB5zVxVGHfDtbtzUt6DyaUlVVcy6io rmEJVRk5YqsuGT81P3zRc7fnMkwgDB+5Q6pPbceO9lcpRtwOyq8gAipVAr1QyPXFBily BwhpAdz1Zj53ZqoyWpiCl1OFZbidItDNQRLX7bK29S+uZDiLUrvut9c9xkQhenXIuoI6 Gamw== X-Gm-Message-State: AJcUukfwkKsvVVRU0sai0jgsai4k0zd/Wqstm9CyWEdqsgsb9uEn3G34 4JnHnXXb4FCDS6T2l7T9dPM= X-Received: by 2002:a63:c904:: with SMTP id o4mr21542547pgg.331.1548721520628; Mon, 28 Jan 2019 16:25:20 -0800 (PST) Received: from dtor-ws ([2620:15c:202:201:3adc:b08c:7acc:b325]) by smtp.gmail.com with ESMTPSA id g28sm54717040pfd.100.2019.01.28.16.25.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Jan 2019 16:25:19 -0800 (PST) Date: Mon, 28 Jan 2019 16:25:18 -0800 From: Dmitry Torokhov To: Richard Leitner Cc: mark.rutland@arm.com, robh+dt@kernel.org, linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RESEND PATCH v2 8/8] Input: sx8654 - convert #defined flags to BIT(x) Message-ID: <20190129002518.GH34692@dtor-ws> References: <20181218083606.25795-1-richard.leitner@skidata.com> <20181218084002.19454-1-richard.leitner@skidata.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181218084002.19454-1-richard.leitner@skidata.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 18, 2018 at 09:40:02AM +0100, Richard Leitner wrote: > Some of the #defined register values are one-bit flags. Convert them to > use the BIT(x) macro instead of 1 byte hexadecimal values. This improves > readability and clarifies the intent. > > Signed-off-by: Richard Leitner Applied, thank you. > --- > drivers/input/touchscreen/sx8654.c | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/drivers/input/touchscreen/sx8654.c b/drivers/input/touchscreen/sx8654.c > index b7b263ed52af..3746ea855f94 100644 > --- a/drivers/input/touchscreen/sx8654.c > +++ b/drivers/input/touchscreen/sx8654.c > @@ -36,6 +36,7 @@ > #include > #include > #include > +#include > > /* register addresses */ > #define I2C_REG_TOUCH0 0x00 > @@ -46,7 +47,7 @@ > #define I2C_REG_SOFTRESET 0x3f > > #define I2C_REG_SX8650_STAT 0x05 > -#define SX8650_STAT_CONVIRQ 0x80 > +#define SX8650_STAT_CONVIRQ BIT(7) > > /* commands */ > #define CMD_READ_REGISTER 0x40 > @@ -56,8 +57,8 @@ > #define SOFTRESET_VALUE 0xde > > /* bits for I2C_REG_IRQSRC */ > -#define IRQ_PENTOUCH_TOUCHCONVDONE 0x08 > -#define IRQ_PENRELEASE 0x04 > +#define IRQ_PENTOUCH_TOUCHCONVDONE BIT(7) > +#define IRQ_PENRELEASE BIT(6) > > /* bits for RegTouch1 */ > #define CONDIRQ 0x20 > @@ -65,8 +66,8 @@ > #define FILT_7SA 0x03 > > /* bits for I2C_REG_CHANMASK */ > -#define CONV_X 0x80 > -#define CONV_Y 0x40 > +#define CONV_X BIT(7) > +#define CONV_Y BIT(6) > > /* coordinates rate: higher nibble of CTRL0 register */ > #define RATE_MANUAL 0x00 > -- > 2.11.0 > -- Dmitry