From patchwork Thu Jan 4 09:03:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ChiYuan Huang X-Patchwork-Id: 18702 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp5495234dyb; Thu, 4 Jan 2024 01:05:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IFrcvMxsxJwW6qeakwwbwQXyzFQRRAXmOCp5JZvvz0TYtBvSf5P0nhwPjtShBima1L1/y8T X-Received: by 2002:a05:6512:304c:b0:50e:7c70:fbe1 with SMTP id b12-20020a056512304c00b0050e7c70fbe1mr176600lfb.100.1704359108794; Thu, 04 Jan 2024 01:05:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704359108; cv=none; d=google.com; s=arc-20160816; b=QkNbz5tWorKLRWc61pLctkpnr7SL6AE+oELstDygCyu7C1WKe8yVnOY+4wItDZ9lLb M6OyRkb3+4gidYU1/FOlR2VNtpl2a+y8tsS5KPta5Rw8JTbncMRJZiGeWXN1pFZZcPIc hreLigwU5O2Z97DSKE3Y+2ongUi5m7QPU+sbajrRpa6H0dO9NFrXPA59gKPCUlDH1SRq aEszZxaCzSXWZ3yaDKPJADNM/8V5GJ4oUY7FonJqPatUNlMvLSA4AfZHejuBYOlACI/o 7DpCSRqQbSI+0javnLVMh6fvYDvloaRFPmxHh3QQYNozliuNonarEd45S1TWWuuXSLZ3 idzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:subject:cc:to:from; bh=nC75Qyob5+QaVCmDb+MCV5gNkxwmeDi45ocg6wKdpyU=; fh=ueBmHjRVA09A3FtSlcus0DauMGTzwSAKpWn3bAtSSko=; b=fuQ1BhpsReFRU8nnxMoKBmBLLSyA14DVhaqg74xCzPBV9yNoy+VssK1TubeXWMTyW/ 1LnzsJWVzpSPyCaA3g0hHp9Q8qBineVkxonJkcXjLotdILXzjcBdUHizKNStJsVrSKl1 pUfo7pn17tGtR5P/S3SMaJM2FtjH/ERhYuWpWJ/cvmfN5kdHqxaUZlngYbEfR9azDiC1 ny6TBl0PtXuZEErprJlQSkRhttQX/i+2SQSc1hbX4IAkeLGWGnKCTO8ukWHkCHZaptyE IHrIUAv3RC0hmI/3SPTS4ACIjAttO1mMx7mGKHm3lH3tz1NwKnKdqzmJnJ+z7BcklYqw qBcg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-16412-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16412-ouuuleilei=gmail.com@vger.kernel.org" Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id c20-20020a05640227d400b0055344c8cfccsi13206995ede.567.2024.01.04.01.05.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 01:05:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-16412-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-16412-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16412-ouuuleilei=gmail.com@vger.kernel.org" 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 63F9B1F24E97 for ; Thu, 4 Jan 2024 09:05:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DC0BC20B02; Thu, 4 Jan 2024 09:04:17 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from mg.richtek.com (mg.richtek.com [220.130.44.152]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E54831EA95; Thu, 4 Jan 2024 09:04:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=richtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=richtek.com X-MailGates: (SIP:2,PASS,NONE)(compute_score:DELIVER,40,3) Received: from 192.168.10.47 by mg.richtek.com with MailGates ESMTPS Server V6.0(636814:1:AUTH_RELAY) (envelope-from ) (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256/256); Thu, 04 Jan 2024 17:03:32 +0800 (CST) Received: from ex4.rt.l (192.168.10.47) by ex4.rt.l (192.168.10.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.27; Thu, 4 Jan 2024 17:03:32 +0800 Received: from linuxcarl2.richtek.com (192.168.10.154) by ex4.rt.l (192.168.10.45) with Microsoft SMTP Server id 15.2.1258.27 via Frontend Transport; Thu, 4 Jan 2024 17:03:32 +0800 From: To: Jonathan Cameron , Krzysztof Kozlowski , Conor Dooley CC: Lars-Peter Clausen , Rob Herring , ChiYuan Huang , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , , , Subject: [PATCH v4 0/2] RTQ6056: Add compatible for the same chip family Date: Thu, 4 Jan 2024 17:03:29 +0800 Message-ID: X-Mailer: git-send-email 1.8.3.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787150057029534393 X-GMAIL-MSGID: 1787150057029534393 From: ChiYuan Huang RTQ6053 and RTQ6059 are the same RTQ6056 family. The differences are listed below - RTQ6053 Only change chip package type - RTQ6059 1. Enlarge the shunt voltage sensing range 2. Shrink the pinout for VBUS sense pin 3. Due to 1, the scale value is also changed Since v4: - Remove the unused chip type enum - Directly return in switch case of read_channel function - Refine in write_raw switch case for IIO_CHAN_INFO_SAMP_FREQ If sample frequency is fixed, return invalid and break switch case - Use devdata->num_channels to replace the predefined constant - Change the rtq6059 difference part for the control bitfield name from the general 'F_xxx' to 'F_RTQ6059_xxx' - Fix rtq6059 average sample variable store problem in 'set_average' function Since v3: - Add Reviewed-by tag in binding document patch - Resotre the enum for control field. - Put all the predefined datas/callbacks in dev_data. - Remove the unused 'rtq6059_info'. - Change 'default_conv_time' to 'default_conv_time_us'. - Move the comment for default config above the dev_data setting line. Since v2: - Refine the description of 'compatible' property ChiYuan Huang (2): dt-bindings: iio: adc: rtq6056: add support for the whole RTQ6056 family iio: adc: rtq6056: Add support for the whole RTQ6056 family .../bindings/iio/adc/richtek,rtq6056.yaml | 9 +- drivers/iio/adc/rtq6056.c | 275 ++++++++++++++++-- 2 files changed, 263 insertions(+), 21 deletions(-) base-commit: 610a9b8f49fbcf1100716370d3b5f6f884a2835a