From patchwork Mon Jul 31 09:44:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antoniu Miclaus X-Patchwork-Id: 128641 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp1976228vqg; Mon, 31 Jul 2023 05:21:59 -0700 (PDT) X-Google-Smtp-Source: APBJJlG498W4RfxCxc0LSr0NIwAn+odIe/GIzyGmTnLM+ej8AQtZe9NKtxGDCbCpWCupozMQI/jX X-Received: by 2002:a05:6830:130f:b0:6b8:807b:b50 with SMTP id p15-20020a056830130f00b006b8807b0b50mr6504722otq.22.1690806119496; Mon, 31 Jul 2023 05:21:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690806119; cv=none; d=google.com; s=arc-20160816; b=QZMH/LBR+Niozqlw60GKXMgzasNVAGxe8SZiWz2pKESb/UGOrOeuqISWgZo38lLhEp 7brwhGEKiCJVZatg9FdQ5WCO8U55SC8uXBEQIdmrPxvJ2HpDZN8ht7qgAmvIVzRkWcbc GMf+2cvz4kFlvg0f4omQI+Y2DhJC9QvThGnnvCkScGIwdGiTBtzazccWQZjNpDd98Vou 8Eem3ydZRe0klAzFTZyuk3J2JA/GYFJY/n4Sh34JvUE3l0vfvLfs6fHH9sBYgWAepRS/ s7zKCFd2V+4WcJgLq06SIXsoiKZIZ9KJn6rsp0EkQEH9cux8tx5bftmt/6cF6UjjRSEY C/Cw== 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 :message-id:date:subject:cc:to:from; bh=BCMjlrxGMijAdp7/TpT63y8Z58DzfDjQnmeshE/djs8=; fh=UzJefE9RYbLi18kqdyRDF9Ifql1AQscxes0LCEBfz7A=; b=EHj8L/RboIgvDLXds0TKyhfXBeabp3k/a72SEv1wajPtu8WwaDWQ5PHtc+Qv6xpcBW QqSjFCqCxQjVrWikOmvfKhtt3EbL9dmZGH+e8OgT+k/S8zJ63CGqjnO5acu/98lNSe8w T8agGtdEdaiXG6yNl10qWGwTLLvCTgfSRiuyG+tJ4pXROOzsdIEQ37cJOoset2L67urI fKPWVfA1vUUpB45JiEqSnSfNReZpY98lTUcdGdMb0I8VHquTzggAe/UXDr03SnZ157iN f0xXTtDRIlM5bZS/OXeQlicdWwKfKKzW2PrZ2n5aTEYRhGmaWKUddPSKWchvbq4IyKzo 4gxw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=analog.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x63-20020a638642000000b0056387def1d0si3750204pgd.396.2023.07.31.05.21.45; Mon, 31 Jul 2023 05:21:59 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=analog.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231890AbjGaLzA (ORCPT + 99 others); Mon, 31 Jul 2023 07:55:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229986AbjGaLy6 (ORCPT ); Mon, 31 Jul 2023 07:54:58 -0400 Received: from mx0a-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E41A1A2; Mon, 31 Jul 2023 04:54:57 -0700 (PDT) Received: from pps.filterd (m0167089.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 36V812o4020043; Mon, 31 Jul 2023 05:45:26 -0400 Received: from nwd2mta4.analog.com ([137.71.173.58]) by mx0a-00128a01.pphosted.com (PPS) with ESMTPS id 3s66qmsr6q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 31 Jul 2023 05:45:24 -0400 (EDT) Received: from ASHBMBX8.ad.analog.com (ASHBMBX8.ad.analog.com [10.64.17.5]) by nwd2mta4.analog.com (8.14.7/8.14.7) with ESMTP id 36V9jAZt006529 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 31 Jul 2023 05:45:10 -0400 Received: from ASHBCASHYB4.ad.analog.com (10.64.17.132) by ASHBMBX8.ad.analog.com (10.64.17.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Mon, 31 Jul 2023 05:45:10 -0400 Received: from ASHBMBX8.ad.analog.com (10.64.17.5) by ASHBCASHYB4.ad.analog.com (10.64.17.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Mon, 31 Jul 2023 05:45:09 -0400 Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx8.ad.analog.com (10.64.17.5) with Microsoft SMTP Server id 15.2.986.14 via Frontend Transport; Mon, 31 Jul 2023 05:45:09 -0400 Received: from amiclaus-VirtualBox.ad.analog.com (AMICLAUS-L02.ad.analog.com [10.48.65.194]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 36V9iwH6024100; Mon, 31 Jul 2023 05:45:01 -0400 From: Antoniu Miclaus To: , , , , , , CC: Antoniu Miclaus Subject: [PATCH v3 1/2] dt-bindings: iio: admv1013: add vcc regulators Date: Mon, 31 Jul 2023 12:44:54 +0300 Message-ID: <20230731094455.26742-1-antoniu.miclaus@analog.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-ADIRuleOP-NewSCL: Rule Triggered X-Proofpoint-GUID: 8f9O44HCS8gBEhXVZxCx-1iJHq5eLM7e X-Proofpoint-ORIG-GUID: 8f9O44HCS8gBEhXVZxCx-1iJHq5eLM7e X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-31_03,2023-07-26_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 mlxscore=0 adultscore=0 bulkscore=0 priorityscore=1501 clxscore=1015 phishscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 spamscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2306200000 definitions=main-2307310088 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772938717546669515 X-GMAIL-MSGID: 1772938717546669515 Add bindings for the VCC regulators of the ADMV1013 microware upconverter. Signed-off-by: Antoniu Miclaus Acked-by: Conor Dooley --- changes in v3: - add missing spaces in the commit subject. .../bindings/iio/frequency/adi,admv1013.yaml | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/frequency/adi,admv1013.yaml b/Documentation/devicetree/bindings/iio/frequency/adi,admv1013.yaml index fc813bcb6532..f2eb2287ed9e 100644 --- a/Documentation/devicetree/bindings/iio/frequency/adi,admv1013.yaml +++ b/Documentation/devicetree/bindings/iio/frequency/adi,admv1013.yaml @@ -39,6 +39,46 @@ properties: description: Analog voltage regulator. + vcc-drv-supply: + description: + RF Driver voltage regulator. + + vcc2-drv-supply: + description: + RF predriver voltage regulator. + + vcc-vva-supply: + description: + VVA Control Circuit voltage regulator. + + vcc-amp1-supply: + description: + RF Amplifier 1 voltage regulator. + + vcc-amp2-supply: + description: + RF Amplifier 2 voltage regulator. + + vcc-env-supply: + description: + Envelope Detector voltage regulator. + + vcc-bg-supply: + description: + Mixer Chip Band Gap Circuit voltage regulator. + + vcc-bg2-supply: + description: + VGA Chip Band Gap Circuit voltage regulator. + + vcc-mixer-supply: + description: + Mixer voltage regulator. + + vcc-quad-supply: + description: + Quadruppler voltage regulator. + adi,detector-enable: description: Enable the Envelope Detector available at output pins VENV_P and @@ -69,6 +109,16 @@ required: - clocks - clock-names - vcm-supply + - vcc-drv-supply + - vcc2-drv-supply + - vcc-vva-supply + - vcc-amp1-supply + - vcc-amp2-supply + - vcc-env-supply + - vcc-bg-supply + - vcc-bg2-supply + - vcc-mixer-supply + - vcc-quad-supply allOf: - $ref: /schemas/spi/spi-peripheral-props.yaml# @@ -87,6 +137,16 @@ examples: clocks = <&admv1013_lo>; clock-names = "lo_in"; vcm-supply = <&vcm>; + vcc-drv-supply = <&vcc_drv>; + vcc2-drv-supply = <&vcc2_drv>; + vcc-vva-supply = <&vcc_vva>; + vcc-amp1-supply = <&vcc_amp1>; + vcc-amp2-supply = <&vcc_amp2>; + vcc-env-supply = <&vcc_env>; + vcc-bg-supply = <&vcc_bg>; + vcc-bg2-supply = <&vcc_bg2>; + vcc-mixer-supply = <&vcc_mixer>; + vcc-quad-supply = <&vcc_quad>; adi,quad-se-mode = "diff"; adi,detector-enable; }; From patchwork Mon Jul 31 09:44:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antoniu Miclaus X-Patchwork-Id: 128626 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp1968574vqg; Mon, 31 Jul 2023 05:09:33 -0700 (PDT) X-Google-Smtp-Source: APBJJlExCpWaCHrRz5erk4KPea5ZLjhjIRS0s2oq6h9A4UTM5bkWZTO6a6nBOOFqT9RmZ+YBBbLw X-Received: by 2002:a17:907:770b:b0:997:ea90:96b4 with SMTP id kw11-20020a170907770b00b00997ea9096b4mr5804430ejc.61.1690805373638; Mon, 31 Jul 2023 05:09:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690805373; cv=none; d=google.com; s=arc-20160816; b=DldKd4o1c+B40hdqIUDclNzZJ09zS3nzgAwKgqw7C7yA0G9hlDCoT8yfyjmFf2xPm9 MR9voEq7iNcT/X+P5EvRyYAC+dJe7AVZPKqnhdIVA7/ct9Uf7UnbGnzWOTDydu3TPxW1 6nm/WwThV+OoOffxNvAyYAoVWYQmbW2g/SbOKv3RRmkRB20A9wRgAmQZ6KRDEKFvhhAa cCn2hEOO+OHLhgkZynoPrWWZc59lhL1ybug7Ar1Gb8ZputRmqQEjwIM3TI8ZmwoYXxT2 2sWk0F/ZD7mTY/Drwa3gD0FATa10r54VD2bIMQm/9D4srcHzGeQiaJS0/uAWbeJSoM+1 ILWQ== 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:date:subject:cc:to:from; bh=FzpXiKFtICAf0K8S6i8X89mBp5u3Xj1POyx521d/qhQ=; fh=UzJefE9RYbLi18kqdyRDF9Ifql1AQscxes0LCEBfz7A=; b=VdQvllcTQ+cUz+8TWab2+CThdfC/95yppsWfCY+r/PzEp+ywr8Z9FC5uiFzsIDBCjN MUlAho5ceGnnjx3OFfFhJaA7tw6fy6gFEwv2WprOFQyxTy5aXNV/uP42RKwnbMbnZxar MTIeoorR2eGcQ/reEopvOwTdvNzegCRSt/C2Xy/O33mvtHzOJOXXLUYPCehBXbflcaLU 9IWDKA+ziUiW4YeVFNhq9nE4AbwuuwI8MX8dyH9nVJdnVqNZ19ru1M/hXehnaCElSkNN IY3EVQHtVZoaNHz65ChDX/vTs3HonxtREU/A3mBTfeRA6knf1LJ5KwHd3RUSUnoZsbTw varg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=analog.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y3-20020a17090629c300b00988939ad0bdsi7118160eje.321.2023.07.31.05.09.09; Mon, 31 Jul 2023 05:09:33 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=analog.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231337AbjGaLgn (ORCPT + 99 others); Mon, 31 Jul 2023 07:36:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229735AbjGaLgk (ORCPT ); Mon, 31 Jul 2023 07:36:40 -0400 Received: from mx0a-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BD46E57; Mon, 31 Jul 2023 04:36:37 -0700 (PDT) Received: from pps.filterd (m0167089.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 36V812o2020043; Mon, 31 Jul 2023 05:45:25 -0400 Received: from nwd2mta4.analog.com ([137.71.173.58]) by mx0a-00128a01.pphosted.com (PPS) with ESMTPS id 3s66qmsr6u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 31 Jul 2023 05:45:24 -0400 (EDT) Received: from ASHBMBX8.ad.analog.com (ASHBMBX8.ad.analog.com [10.64.17.5]) by nwd2mta4.analog.com (8.14.7/8.14.7) with ESMTP id 36V9jDfg006532 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 31 Jul 2023 05:45:13 -0400 Received: from ASHBMBX9.ad.analog.com (10.64.17.10) by ASHBMBX8.ad.analog.com (10.64.17.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Mon, 31 Jul 2023 05:45:12 -0400 Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx9.ad.analog.com (10.64.17.10) with Microsoft SMTP Server id 15.2.986.14 via Frontend Transport; Mon, 31 Jul 2023 05:45:12 -0400 Received: from amiclaus-VirtualBox.ad.analog.com (AMICLAUS-L02.ad.analog.com [10.48.65.194]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 36V9iwH7024100; Mon, 31 Jul 2023 05:45:04 -0400 From: Antoniu Miclaus To: , , , , , , CC: Antoniu Miclaus Subject: [PATCH v3 2/2] drivers: iio: admv1013: add vcc regulators Date: Mon, 31 Jul 2023 12:44:55 +0300 Message-ID: <20230731094455.26742-2-antoniu.miclaus@analog.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230731094455.26742-1-antoniu.miclaus@analog.com> References: <20230731094455.26742-1-antoniu.miclaus@analog.com> MIME-Version: 1.0 X-ADIRuleOP-NewSCL: Rule Triggered X-Proofpoint-GUID: dUpWPT6YWkYVA-iYC99N3i8Sjb23EmvM X-Proofpoint-ORIG-GUID: dUpWPT6YWkYVA-iYC99N3i8Sjb23EmvM X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-31_03,2023-07-26_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 mlxscore=0 adultscore=0 bulkscore=0 priorityscore=1501 clxscore=1015 phishscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 spamscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2306200000 definitions=main-2307310088 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772937935437579582 X-GMAIL-MSGID: 1772937935437579582 Add regulators for the VCC supplies of the admv1013. The patch aims to align the implementation with the current admv1014 driver where all the VCC supplies are handled as regulators. Signed-off-by: Antoniu Miclaus --- changes in v3: - add missing spaces in the commit subject. - use dev_err_probe for error handling. - - use `devm_regulator_bulk_get_enable` drivers/iio/frequency/admv1013.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/iio/frequency/admv1013.c b/drivers/iio/frequency/admv1013.c index 9bf8337806fc..cc01fac2dfee 100644 --- a/drivers/iio/frequency/admv1013.c +++ b/drivers/iio/frequency/admv1013.c @@ -379,6 +379,11 @@ static const struct iio_info admv1013_info = { .debugfs_reg_access = &admv1013_reg_access, }; +static const char * const admv1013_vcc_regs[] = { + "vcc-drv", "vcc2-drv", "vcc-vva", "vcc-amp1", "vcc-amp2", + "vcc-env", "vcc-bg", "vcc-bg2", "vcc-mixer", "vcc-quad" +}; + static int admv1013_freq_change(struct notifier_block *nb, unsigned long action, void *data) { struct admv1013_state *st = container_of(nb, struct admv1013_state, nb); @@ -554,6 +559,15 @@ static int admv1013_properties_parse(struct admv1013_state *st) return dev_err_probe(&spi->dev, PTR_ERR(st->reg), "failed to get the common-mode voltage\n"); + ret = devm_regulator_bulk_get_enable(&st->spi->dev, + ARRAY_SIZE(admv1013_vcc_regs), + admv1013_vcc_regs); + if (ret) { + dev_err_probe(&spi->dev, ret, + "Failed to request VCC regulators\n"); + return ret; + } + return 0; }