Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp429532lqp; Mon, 10 Jun 2024 08:18:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU47QsQSiD+ss414l7Eqgkb8LOxWp/wdlJDiGlJGrBPzCt+lz9KYBOt+IFxt/NsNsTj1t1JvlqtoIuwRyMRZ8G43VO2+sAwSemYn5hRkQ== X-Google-Smtp-Source: AGHT+IHISGjE8oPA6aKBLoDc3PJggUVf/fMZK9pWs50dEY39F0wVksQbhqGJdYIx0DmADDJLgFKx X-Received: by 2002:a17:906:2994:b0:a6f:1dda:b04f with SMTP id a640c23a62f3a-a6f1ddab1c3mr205818166b.17.1718032689748; Mon, 10 Jun 2024 08:18:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718032689; cv=pass; d=google.com; s=arc-20160816; b=NTCakc5PZxrJnMI3QcmgOKmLWm65XLAmr+Plj8K6eMJL1LfwJEG4akiMmyicmEqqhn K3YXlzRb8WCMbsj7wHU3QXUe848mt7bRDaT2fnnqAyw69qo3k2U9qLoJ42SkJLBNu2Q4 3/d0xLZountKAlpfijtjXsYU07MU4hs1eWbBcwXymZ3nFiqQBmErv7PXRlZ9+yt24PnZ rvC/8rxioW01E1smnv2UzlRx0VvHcK+b2b5IZBVBSnmGHdg2BLkwEaZppgSD6wL3BYWe ZUnNtN/jOeJjskNISRSSgTr7eF5K3Dicuct7U5gOz6if6XAWJov6HtHHWsH2zSXkRmum yieg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:date:from; bh=k0udD06VCD3JLNkq+gO2Jn8xT/1L+HSUUrq7zqUndms=; fh=eKZD4BTG+JtIaVCXoMQF8LEQc6OyJjLiS3hjAnGfjYs=; b=Ozyrl6M8z7VCrUH8/dcU9Ok6dm88HZBf/BlwVlv2QQkZ9BG/YeFVE+9w4Nrsb3ohtk O+QJYAM278OmbKoMRp9U97Jl5s8IpmbojN/TNcnXQLkrRaB201eU5ZF5nVqiDnuW1il5 uoO5KhMZnnWTYSOWnkdACHSqfC0FqyOC2qA6jQWTcimuhSGLHs2PR+DW+6h0rj/UlQSP CyDMuvGKCDW3Xgj/ZTINfCrr3nzzA8Fua0FX8bcHwPEU/6izk+fzW1DS/5HqAUz1LJI+ 0Ckzgh2XJN5tzhwJTNTNkjb5tyzmMSx8j+eoZkFO5QW9YZgGkJfNGmNBOshUi74stdSv wpRw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-208429-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208429-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f0bc2a30csi234561166b.11.2024.06.10.08.18.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 08:18:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-208429-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-208429-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208429-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 7A81B1F24E61 for ; Mon, 10 Jun 2024 15:12:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DA9381384A9; Mon, 10 Jun 2024 15:12:02 +0000 (UTC) Received: from fgw23-7.mail.saunalahti.fi (fgw23-7.mail.saunalahti.fi [62.142.5.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA5F61E4A0 for ; Mon, 10 Jun 2024 15:12:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.84 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718032322; cv=none; b=gutLfEIcOxxKqZrdfvmpgy1JQXOCsbahBoh/ws0bXOkjnfGlL2SYorh+d4df0d4+aSt1doj0GkJxtYg+zbps0Ds/1CDcB1qs82WS3Yv511Ep8wr97G4fIthKjKfhYk7UDa8Zb2zsQ2MwSW8+1fjWwr+MkGV23acscR2fJvlrV2U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718032322; c=relaxed/simple; bh=pmr3IaJucK5vtXikM3GHEO/xGVGpp9EtqrqVvOdNDDk=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GGd1TU3lrbzNr50lXePJj/cXF66PewyiNqxPOupgLy3peI3rMhyw6GGAA00gorgo5TBYsOVyjF0nseu6JPMmRcQmswcKrwTc1HgivxW65YLYEu+QXlFulQderPmrnEpj38xs7+KhL3OrDvRBplRFISDkKYEX0iSjyDkWlctVbFQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com; spf=fail smtp.mailfrom=gmail.com; arc=none smtp.client-ip=62.142.5.84 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=gmail.com Received: from localhost (88-113-25-87.elisa-laajakaista.fi [88.113.25.87]) by fgw21.mail.saunalahti.fi (Halon) with ESMTP id c7fddaa1-273b-11ef-ab0e-005056bdd08f; Mon, 10 Jun 2024 18:11:58 +0300 (EEST) From: Andy Shevchenko Date: Mon, 10 Jun 2024 18:11:58 +0300 To: Laurent Pinchart Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-gpio@vger.kernel.org, linux-pwm@vger.kernel.org, Bartosz Golaszewski , Conor Dooley , Krzysztof Kozlowski , Lee Jones , Linus Walleij , Rob Herring , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Haibo Chen Subject: Re: [PATCH v4 2/4] mfd: adp5585: Add Analog Devices ADP5585 core support Message-ID: References: <20240608141633.2562-1-laurent.pinchart@ideasonboard.com> <20240608141633.2562-3-laurent.pinchart@ideasonboard.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240608141633.2562-3-laurent.pinchart@ideasonboard.com> Sat, Jun 08, 2024 at 05:16:31PM +0300, Laurent Pinchart kirjoitti: > From: Haibo Chen > > The ADP5585 is a 10/11 input/output port expander with a built in keypad > matrix decoder, programmable logic, reset generator, and PWM generator. > This driver supports the chip by modelling it as an MFD device, with two > child devices for the GPIO and PWM functions. > > The driver is derived from an initial implementation from NXP, available > in commit 8059835bee19 ("MLK-25917-1 mfd: adp5585: add ADI adp5585 core > support") in their BSP kernel tree. It has been extensively rewritten. ... > +#include > +#include + err.h > +#include > +#include > +#include > +#include > +#include > +#include > +#include ... > +static const struct mfd_cell adp5585_devs[] = { > + { .name = "adp5585-gpio", }, > + { .name = "adp5585-pwm", }, Inner commas are not needed. > +}; ... > +#define ADP5585_Rx_PULL_CFG_PU_300K 0 > +#define ADP5585_Rx_PULL_CFG_PD_300K 1 > +#define ADP5585_Rx_PULL_CFG_PU_100K 2 > +#define ADP5585_Rx_PULL_CFG_DISABLE 3 > +#define ADP5585_Rx_PULL_CFG_MASK 3 Still supplying MASK is strange, why not supplying DISABLE? ... > +#define ADP5585_OSC_EN BIT(7) > +#define ADP5585_OSC_FREQ_50KHZ (0U << 5) > +#define ADP5585_OSC_FREQ_100KHZ (1U << 5) > +#define ADP5585_OSC_FREQ_200KHZ (2U << 5) > +#define ADP5585_OSC_FREQ_500KHZ (3U << 5) > +#define ADP5585_OSC_FREQ_MASK (3U << 5) GENMASK() ? And possible the similar question as per above. -- With Best Regards, Andy Shevchenko