Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3553433imw; Mon, 18 Jul 2022 10:06:26 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vqCCKPKwbSAhl3O4F7ssbCmjH4BwIp+QghwdLs9dTwPuvprWV3o7Fel8abd/15Wy72p37h X-Received: by 2002:a17:906:98d4:b0:72b:7258:dee0 with SMTP id zd20-20020a17090698d400b0072b7258dee0mr26685335ejb.57.1658163986673; Mon, 18 Jul 2022 10:06:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658163986; cv=none; d=google.com; s=arc-20160816; b=HO1L5E6h8H0MA2WANFGvTiXAJ0KJxTRIUar2QiZPdBtDt2+B3JIQAT9fMuMUcNmlFy CrEAPRm35JFVUJQQ+X2Af9AEOATgH5JiGj8RDWNp6asb/cYXub0Js89tj/QXRBm8Aw75 txCuM4ILjISsbciCoC2Oi3DbefxJ17bTMTIHsWGbE5WuqDBve+9Ey/09s5CMaHRTZISn 4Jp+kmOo59Q13CjXB3o6GT/VT5OZ2wyvRtZJnHBYN8Y2fR/DD+FUJSmzSIpoBHsyS9Zf aIJ6W2YTUyVRyhNYfpSTVxfFwFq+kyzStDUpZdN+eXt4m5DXkEkW3ypWn2fKDmgxyvc7 4XXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=twQwx3dUFZ8KfuOWY5yqQW1XrAG5zftwqBYe44cuEd4=; b=Dq6z5sFiexbwzy+f0uxA703qqIcFbiKC8nxwYcToQo/3loMOvlHuMT4gZilAbxXRQz 1sH2/3oHBjwKBi9q6ro8AFcY7AhVPd8ufuBFVbJTGvqXp3RRZq6zW3Y0Vse3lmF57Vah WwGM609FOYuVDkv4EAosIxJCTv4HyeRUvsDTTN01kv5YXT7zhKT/2AJjBdTeAaMOHUj3 ljm3TdsLQ134eZSOkk+leCvZJD4RWyJ3S5naOQ0e1i43hhJHvLp1qksCyKwsjK+m0QYT oLxMbO3g+EBL/nAEj/P5HlKm1aRpOd1n5TRAICPtZJzt5O1akk91/c/T/Gj9K64OIkDh V2qQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BGxX9vsM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gn13-20020a1709070d0d00b0072b3cde0ce8si17209735ejc.471.2022.07.18.10.05.59; Mon, 18 Jul 2022 10:06:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BGxX9vsM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235547AbiGRQnD (ORCPT + 99 others); Mon, 18 Jul 2022 12:43:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232158AbiGRQnB (ORCPT ); Mon, 18 Jul 2022 12:43:01 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78413FD07; Mon, 18 Jul 2022 09:43:00 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0BD25614D5; Mon, 18 Jul 2022 16:43:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D518C341C0; Mon, 18 Jul 2022 16:42:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658162579; bh=mt3Hyx8w6+AK+UEpBf+TEowqs5ZfWsQtF+zhUIoosBg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=BGxX9vsMm1Ecrtq84DecdKj2ORySdm25ksz6E2U2vy91SN+3jC3GDANNGLUVg5lnP e4nJPEkDUuQTG8z2+sVPseOya+28/8YR/gbw8DbnXG2hmDvdWy91geYgVEkBhtI/yA c0Pfbzj3uh17pMp1a67PBC0cDA01HCa68YgL6bfE0GjGq/O4DqoLQ8g6vxUeK/K3FM kuwyFcpLF59a1bpliKM7nfSvxckVg1f87cKrs0Gfw93tiXiMwUlVaQTOZCUNeMNjjF B8OTLAipPWoMzX3IPty7g+nuMX1AI8cd8lYthlhjNbvqoSPWfs0UuFMzssUCc3SesF ex2a8XW5rhW9g== Date: Mon, 18 Jul 2022 17:52:53 +0100 From: Jonathan Cameron To: cy_huang Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, lars@metafoo.de, cy_huang@richtek.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v7 0/3] Add Richtek RTQ6056 support Message-ID: <20220718175253.1333a61a@jic23-huawei> In-Reply-To: <1658123163-10039-1-git-send-email-u0084500@gmail.com> References: <1658123163-10039-1-git-send-email-u0084500@gmail.com> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 18 Jul 2022 13:46:00 +0800 cy_huang wrote: > From: ChiYuan Huang > > This patch series is to enable Richtek RTQ6056 support. > > The RTQ6056 is a high accuracy current-sense monitor with I2C interface, and > the device provides full information for system by reading out the load current > and power. If sending a new version without there being any public replies to the previous version please reply to that thread yourself to say you are resending and why. Greatly reduces the chances of me picking up the wrong version! > > Since v7 > - Use 'DEFINE_RUNTIME_DEV_PM_OPS' to replace the explicit declaration of pm_ops. > > Since v6 > - Remove specific rtq6056 ABI document. > - Update integration time description in general ABI document. > - Remove the redundant blank line. > - To prevent the race condition for attribute wrtie and shunt resistor write, > use 'iio_device_claim_direct_mode' API. > - Refine the order for 'action_reset' and 'pm_runtime'. > - Fix text typo in comment like as ohm to Ohm and timea to time. > > Since v5 > - Fix kernel version text for ABI. > > Since v4 > - Add '__aligned(8)' for timestamp member. > - Declare timestamp from 'int64_t' to more unified 's64'. > > Since v3 > - change the node name to be generic 'adc' in binding example. > - Refine pm_runtime API calling order in 'read_channel' API. > - Fix vshunt wrong scale for divider. > - Refine the comment text. > - Use 'devm_add_action_or_reset' to decrease the code usage in probe > function. > - Use RUNTIME_PM_OPS to replace SET_RUNTIME_PM_OPS. > - minor fix for the comma. > - Use pm_ptr to replace the direct assigned pm_ops. > > Since v2 > - Change the resistor property name to be generic 'shunt-resistor-micro-ohms'. > - Rename file from 'rtq6056-adc' to 'rtq6056'. > - Refine the ABI, if generic already defined it, remove it and check the channel > report unit. > - Add copyright text. > - include the correct header. > - change the property parsing name. > - To use iio_chan_spec address field. > - Refine each channel separate and shared_by_all. > - Use pm_runtime and pm_runtime_autosuspend. > - Remove the shutdown callback. From the HW suggestion, it's not recommended to > use battery as the power supply. > - Check all scale unit (voltage->mV, current->mA, power->milliWatt). > - Use the read_avail to provide the interface for attribute value list. > - Add comma for the last element in the const integer array. > - Refine each ADC label text. > - In read_label callback, replace snprintf to sysfs_emit. > > ChiYuan Huang (3): > dt-bindings: iio: adc: Add rtq6056 adc support > iio: adc: Add rtq6056 support > Documentation: ABI: testing: rtq6056: Update ABI docs > > Documentation/ABI/testing/sysfs-bus-iio | 10 + > .../bindings/iio/adc/richtek,rtq6056.yaml | 56 ++ > drivers/iio/adc/Kconfig | 15 + > drivers/iio/adc/Makefile | 1 + > drivers/iio/adc/rtq6056.c | 663 +++++++++++++++++++++ > 5 files changed, 745 insertions(+) > create mode 100644 Documentation/devicetree/bindings/iio/adc/richtek,rtq6056.yaml > create mode 100644 drivers/iio/adc/rtq6056.c >