Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5989161ybe; Tue, 10 Sep 2019 11:48:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqwSqfcahgUJWpIk8HIN5ZLKAoUNtEAtom+X37xdb+43JK1tLrkUN/mV94SvmXuNcTqNcDfk X-Received: by 2002:a05:6402:16d5:: with SMTP id r21mr4302523edx.71.1568141335965; Tue, 10 Sep 2019 11:48:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1568141335; cv=pass; d=google.com; s=arc-20160816; b=MaY2D9jlnFcqPsD/UbK7eV2YKLCjWrdlZoObJNf+a3bRy/cr0QqMMTaQSCQMaAe2sW 5USTdmGH+S86OZND/6SH5cyysCf6rRvGwbVywxXTVryts2x6MFv0ZYdhlakeNZh1GBbp /bbEJCzNeSOqON08Wo2h60Y9o0nJrbrhlK3MCqe3VPIlvtbHBipRZiOLFbmZxpq30eU8 FQDAu/Gjv7c+kKCflKkTgz+ScgHzCe44Yk1szurbACsdiWMKFvl+p52puTxC1e9NVaVW 67lG9zFSSbJS7WeW27TXsA7jmMKghtBZ7sgMPPxowvYNQV5bwemTtm1xZkJmE/9ZHcN6 hxiQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=wOC+Tl+9sA8VHFcI3fdk9syq6SeNSlDvyvJeCCnfbNM=; b=jTaRtKGJY1amdBeO74FjSpgqkBEfdmTHx1xRjZ+89a4ICUV3SOXVrPG+H9En2r3wlF euwc7V08/cqMty64GyToJA0BcovzqQs0DDZDnjAYCS6nIvD3b+Bvtnr42jD9SLFNFda6 P8jxNluhvzfJTYXYFYFOGhZUFs6CCqoPH+qF0OxmNKh11pNmOIihoEdL2M3kjKdLC4QZ pdjNAg1OCj9yS4UJ5itJfrMa9tTpqSdywZLSbGyffO0V/v5VELm7sWK9zsC4etKh+5VV gfB4FsnAhHZfqPlwGb0S1S+i8337D/09c/8QmBCkKkHqXdRAxYA8vp+U9cpQLw/6DWL4 KjfQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@toradex.com header.s=selector2 header.b="WMIZ2/Jp"; arc=pass (i=1 spf=pass spfdomain=toradex.com dkim=pass dkdomain=toradex.com dmarc=pass fromdomain=toradex.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=toradex.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g4si1783165edr.377.2019.09.10.11.48.31; Tue, 10 Sep 2019 11:48:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@toradex.com header.s=selector2 header.b="WMIZ2/Jp"; arc=pass (i=1 spf=pass spfdomain=toradex.com dkim=pass dkdomain=toradex.com dmarc=pass fromdomain=toradex.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=toradex.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404634AbfIJGVU (ORCPT + 99 others); Tue, 10 Sep 2019 02:21:20 -0400 Received: from mail-eopbgr50108.outbound.protection.outlook.com ([40.107.5.108]:55813 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725916AbfIJGVU (ORCPT ); Tue, 10 Sep 2019 02:21:20 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jx3pi3zH9YD62KmQyR/3XYBCtn6nQwM7yJ9tMdVFneRj2KS87DrkPqZQX87lA6liG+tBxAMeRZXRFAsabLgPvjorZR/Lx+RxbFP5Rvujs3gg/n48Jw7FoEFa12sVPPY+YFokzLB36uy1ZQU8ACNbzhtGalHpUHIx1RbuC7aEtgx7aOjbSNykCXUWCyrcHqCmrnPLSH805engKL4Dyi3FEtHNnzEJbWf3EZHJ4lpWElvv/yHZ/3kBG44YQVy243W4FipKzeJgCXwedBrSeG7AgJ/aBIyikSaur4DDUPDyOLL0kzxWkii0dbvnGSF/9ssBw5TxgibPowTeMoI2bZoO9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wOC+Tl+9sA8VHFcI3fdk9syq6SeNSlDvyvJeCCnfbNM=; b=KF9U83MhxJJdBI0VltFb6Zo6zbQqDZA3Xed0bQuOMsrRLL8/d/ilwZLY4OZg592aPJ2b/2u5m+C4c2XVhnEeVPUUekUC16y/424X4r0IcNhecUkQEjOj2ix0RU8EilH5Lbf3loeWRejVcD0REUuJ0DzOy7szEN8wtOj6XtsJADGD1C3D/SeiRI4TqRWg/mVq1lUaeWRMXxdhXkoRgGUxYH6mct5PkOjQPI68INnWA+VqMUSWpu2IkQJAu2qvROGF1AbEITyxT7dwnfk5zb8ICb7T3jUYHvAofvuNBtUoLVk4BGsvVt4xjuEw8fp6PlddVsnWPnCDh93acet6arI3BA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=toradex.com; dmarc=pass action=none header.from=toradex.com; dkim=pass header.d=toradex.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toradex.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wOC+Tl+9sA8VHFcI3fdk9syq6SeNSlDvyvJeCCnfbNM=; b=WMIZ2/Jpiri19C2qgIUD5xYig8tGxokMFcEau4LQ3A4RRuwjFJGSjLzUc/vok0ctS724Y5FAPa8lokf0nes5ozbmt0uiGjKa15P5DCXJzPjmH57wNouDyB2HyztAppF8+qfg7f2x8/lgpjLvvquKf/EXeSBQoGs8I0n06+kGaKY= Received: from VI1PR0502MB3965.eurprd05.prod.outlook.com (52.134.17.157) by VI1PR0502MB3054.eurprd05.prod.outlook.com (10.175.21.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2241.20; Tue, 10 Sep 2019 06:21:13 +0000 Received: from VI1PR0502MB3965.eurprd05.prod.outlook.com ([fe80::f59f:a307:9c53:63b9]) by VI1PR0502MB3965.eurprd05.prod.outlook.com ([fe80::f59f:a307:9c53:63b9%6]) with mapi id 15.20.2241.018; Tue, 10 Sep 2019 06:21:13 +0000 From: Philippe Schenker To: "linux-kernel@vger.kernel.org" , Mark Brown , Shawn Guo , Sascha Hauer , Liam Girdwood CC: "devicetree@vger.kernel.org" , Max Krummenacher , Rob Herring , Stefan Agner , Marcel Ziswiler , Mark Rutland , Luka Pivk , Philippe Schenker , Fabio Estevam , "linux-arm-kernel@lists.infradead.org" , Pengutronix Kernel Team , NXP Linux Team Subject: [PATCH v2 0/3] Add new binding regulator-fixed-clock to regulator-fixed Thread-Topic: [PATCH v2 0/3] Add new binding regulator-fixed-clock to regulator-fixed Thread-Index: AQHVZ5/xkR9Jah05zE2oPXjXVjZAdQ== Date: Tue, 10 Sep 2019 06:21:13 +0000 Message-ID: <20190910062103.39641-1-philippe.schenker@toradex.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: PR0P264CA0052.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1d::16) To VI1PR0502MB3965.eurprd05.prod.outlook.com (2603:10a6:803:23::29) authentication-results: spf=none (sender IP is ) smtp.mailfrom=philippe.schenker@toradex.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.23.0 x-originating-ip: [46.140.72.82] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4f1415d6-8898-4739-5746-08d735b7142c x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(2017052603328)(7193020);SRVR:VI1PR0502MB3054; x-ms-traffictypediagnostic: VI1PR0502MB3054: x-ms-exchange-purlcount: 1 x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 01565FED4C x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(4636009)(136003)(39850400004)(366004)(346002)(396003)(376002)(85664002)(189003)(199004)(966005)(316002)(25786009)(14454004)(4326008)(256004)(71200400001)(71190400001)(7736002)(305945005)(53936002)(478600001)(50226002)(36756003)(8936002)(66476007)(66556008)(81156014)(64756008)(81166006)(66446008)(66946007)(486006)(44832011)(110136005)(99286004)(1076003)(6506007)(386003)(8676002)(2616005)(476003)(2501003)(6512007)(6306002)(14444005)(26005)(54906003)(5660300002)(7416002)(86362001)(6116002)(3846002)(102836004)(186003)(2906002)(52116002)(6486002)(6436002)(66066001);DIR:OUT;SFP:1102;SCL:1;SRVR:VI1PR0502MB3054;H:VI1PR0502MB3965.eurprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: toradex.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: K/br8gfpFViuYdqMinKyN30Btffutp5tfNwnX6kk3RW9fyrIXTbgv3l5YWkgELNaZ2gEkZNEXDu6CALqm59jNcHZ6YY+HCgUHdvV6rByNOb8gqE9UmELbdIeh2+seOcT0TzbQ3lI4jHtbEG5bDiecdfRbgct03+CDPLaFfqPb+oJNlzlJvtiandnIeMUy2MGzMKhVtaEwxuRNQIqGjtbAqgwoOp+TirGN6nbEZ427TgSuLyqpRC0y4Jcsyk7AyQl/KKXUZMrzJ7pubuUSokuEGOSEV2NvH0bKSbJSBFfAoyXSuAajdZFKnLJ1IDC7LI3wgrUE93opcTgRK8nL/xuT1iXBUfTGrAR9LVYuXfofpe31wDx7zySc03AQ7/JYQGWJ9oWHnX33mrzMohfgLlxbmcFcVYdA2/kWd1a8gCm/1M= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: toradex.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4f1415d6-8898-4739-5746-08d735b7142c X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Sep 2019 06:21:13.3000 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: d9995866-0d9b-4251-8315-093f062abab4 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Vf8v2mx4mlymcRQbqHfRFJbC/YSHTTYfiqvLcMUwP0Px/FsWkLsEYZM7Qy7dXeKPECk6ZqYMcRrUnBvhFIs9EF9taVltvViepqY8K6HV4dY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0502MB3054 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Our hardware has a FET that is switching power rail of the ethernet PHY on and off. This switching enable signal is a clock from the SoC. There is no possibility in regulator subsystem to have this hardware reflected in software. I already discussed with Mark Brown about possible solutions and he suggested to create at least a new compatible. [1] This discussion includes also a better explanation of our circuit as well as schematics. So please refer to that link if you have questions about that. In this first attempt I created a new binding "regulator-fixed-clock" that can take a clock from devicetree. This is a simple addition to regulator-fixed. If the binding regulator-fixed-clock is given, the clock is simply enabled on regulator enable and disabled on regulator disable. To be able to have multiple consumers a counter variable is also given that tells how many consumers need power from this regulator. Best regards, Philippe [1] https://lkml.org/lkml/2019/8/7/78 Changes in v2: - return priv->clk_enable_counter > 0 directly. - Change select: to if: - Change items: to enum: - Defined how many clocks should be given Philippe Schenker (3): regulator: fixed: add possibility to enable by clock ARM: dts: imx6ull-colibri: add phy-supply and respective regulator dt-bindings: regulator: add regulator-fixed-clock binding .../bindings/regulator/fixed-regulator.yaml | 19 ++++- arch/arm/boot/dts/imx6ull-colibri.dtsi | 12 +++ drivers/regulator/fixed.c | 83 ++++++++++++++++++- 3 files changed, 110 insertions(+), 4 deletions(-) --=20 2.23.0