From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56C41C2D0E5 for ; Sat, 28 Mar 2020 12:04:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2F020207FF for ; Sat, 28 Mar 2020 12:04:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=walle.cc header.i=@walle.cc header.b="XLgcUGYR" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726269AbgC1MEz (ORCPT ); Sat, 28 Mar 2020 08:04:55 -0400 Received: from ssl.serverraum.org ([176.9.125.105]:34069 "EHLO ssl.serverraum.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726199AbgC1MEz (ORCPT ); Sat, 28 Mar 2020 08:04:55 -0400 Received: from ssl.serverraum.org (web.serverraum.org [172.16.0.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 06D1423058; Sat, 28 Mar 2020 13:04:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1585397092; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=n5jtDDhzPSvYKIS+PmQfH6uIuXE3eV4q3g/zF9Fsvio=; b=XLgcUGYRO9K8MDB5bv0eN6E/rPVGT7+8hpRkYKa0oYK7kqG+J82GWy9Z9UrVXXM2d3TY/l 44dxqw9vOcjFA43tDjkZeTHYvo/ZL/wck9Z06bEN5KblEyL2ihn4+V5olaW8sgt5tfgn5X sAEssrEkn0SCRxZcAsyH0d9PcQckI6U= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Sat, 28 Mar 2020 13:04:50 +0100 From: Michael Walle To: Bartosz Golaszewski Cc: linux-gpio , linux-devicetree , LKML , linux-hwmon@vger.kernel.org, linux-pwm@vger.kernel.org, LINUXWATCHDOG , arm-soc , Linus Walleij , Rob Herring , Jean Delvare , Guenter Roeck , Lee Jones , Thierry Reding , =?UTF-8?Q?Uwe_Kleine-K=C3=B6nig?= , Wim Van Sebroeck , Shawn Guo , Li Yang , Thomas Gleixner , Jason Cooper , Marc Zyngier Subject: Re: [PATCH 12/18] gpio: add support for the sl28cpld GPIO controller In-Reply-To: References: <20200317205017.28280-1-michael@walle.cc> <20200317205017.28280-13-michael@walle.cc> Message-ID: X-Sender: michael@walle.cc User-Agent: Roundcube Webmail/1.3.10 X-Spamd-Bar: + X-Rspamd-Server: web X-Rspamd-Queue-Id: 06D1423058 X-Spamd-Result: default: False [1.40 / 15.00]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TAGGED_RCPT(0.00)[dt]; MIME_GOOD(-0.10)[text/plain]; DKIM_SIGNED(0.00)[]; RCPT_COUNT_TWELVE(0.00)[21]; NEURAL_HAM(-0.00)[-0.578]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_CC(0.00)[vger.kernel.org,lists.infradead.org,linaro.org,kernel.org,suse.com,roeck-us.net,gmail.com,pengutronix.de,linux-watchdog.org,nxp.com,linutronix.de,lakedaemon.net]; MID_RHS_MATCH_FROM(0.00)[]; SUSPICIOUS_RECIPS(1.50)[] Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi Bartosz, Am 2020-03-18 10:14, schrieb Bartosz Golaszewski: > wt., 17 mar 2020 o 21:50 Michael Walle napisaƂ(a): >> >> This adds support for the GPIO controller of the sl28 board management >> controller. This driver is part of a multi-function device. >> >> Signed-off-by: Michael Walle > > Hi Michael, > > thanks for the driver. Please take a look at some comments below. > >> --- [..] >> +#define GPIO_REG_DIR 0 >> +#define GPIO_REG_OUT 1 >> +#define GPIO_REG_IN 2 >> +#define GPIO_REG_IE 3 >> +#define GPIO_REG_IP 4 > > These values would be more clear if they were defined as hex. > >> + >> +#define GPI_REG_IN 0 >> + >> +#define GPO_REG_OUT 0 > > Please also use a common prefix even for defines. The GPIO_, GPI_ and GPO_ prefixes corresponds to the different flavours. Do they still need a common prefix? Ie. the GPI_REG_IN has nothing to do with GPO_REG_OUT, nor has both something to do with the GPIO_REG_IN and GPIO_REG_OUT. I could prefix them with SL28CPLD_ though. But I don't know if that is what you had in mind because then they would be SL28CPLD_GPIO_REG_IN and SL28CPLD_GPI_REG_IN for example. -michael