From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4D40C4332F for ; Mon, 1 Nov 2021 10:20:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8875660F70 for ; Mon, 1 Nov 2021 10:20:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231822AbhKAKXF (ORCPT ); Mon, 1 Nov 2021 06:23:05 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:46709 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231745AbhKAKXE (ORCPT ); Mon, 1 Nov 2021 06:23:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635762031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6GKVOIqK7nVWtbHe5Lw3RempWLyywE1J9gAebyUeQYo=; b=ilntWRlgoN+VGgRqTA085elgZwMm+Wikrf6apC7rUTRmwA7NRflglD4EijkaljBwi8B2K/ QDqAkd8wnBbt8TxZEAgdLObNIxc5gFrkRAjnXvjOAoeiic7BoOhHLJyQi0Q8VefBXr766K nc61mbHy3bQz+MRUrXP+8XdmPcR0XQo= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-560-Yi_5yrf_MmStUAZObWLE5A-1; Mon, 01 Nov 2021 06:20:30 -0400 X-MC-Unique: Yi_5yrf_MmStUAZObWLE5A-1 Received: by mail-ed1-f72.google.com with SMTP id r25-20020a05640216d900b003dca3501ab4so15040219edx.15 for ; Mon, 01 Nov 2021 03:20:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=6GKVOIqK7nVWtbHe5Lw3RempWLyywE1J9gAebyUeQYo=; b=EkfNQTxTGRcEgZkZfXObAuC4SIUaI2YdLTFIp6M91PvdfsxPukN3SVnloNL94jDk3O xf7hGrE49YLjrPSxJlHk5W8BNQDjN91IkEK4hMUzSvZwEU6Hn7AASQrxAM38zRCsKkOc wUHJmg66bcu8Vk7tgfzLcMP5dt6lec/L2c6+75+JspnQ1JAUBQ34duk0k39DIsbmfv/G xoUIEiLwzqMrU0hbg4uB3KRHS6ENwyox8keF4Tl8G7S28VNVycKJG3vRYPojUmjRsN7t w20Gmu1UuaaWdFwCuZtKxlyFIEPAbPZVlwMecYjNQ7OJLWYUQr/O5Zdq1ewSJce5j5Zd eM/w== X-Gm-Message-State: AOAM530udS9Zoej3K5V+2dAw6aLDmrO/XPOe78YLhh9m+FMu9k6rBg9Q NdjMxT+TvyDV8CRTuKPXnl8NQtkojj+lT+LbN/b6ChxwJtdeqbr8GwPZUiWhtnVfpSCliS/bCZU qHHUFbNhIgX0qrrIpic6k X-Received: by 2002:a17:907:6da4:: with SMTP id sb36mr35639752ejc.490.1635762029173; Mon, 01 Nov 2021 03:20:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEHfQy0TcctxhEUS7W+qUxUEatSVkMN784xMt2dLb/n/0z432ckOav1RgTwKmh1k2nt3yoIA== X-Received: by 2002:a17:907:6da4:: with SMTP id sb36mr35639725ejc.490.1635762028980; Mon, 01 Nov 2021 03:20:28 -0700 (PDT) Received: from [10.40.1.223] ([81.30.35.201]) by smtp.gmail.com with ESMTPSA id h10sm8869323edk.41.2021.11.01.03.20.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 01 Nov 2021 03:20:28 -0700 (PDT) Message-ID: <2c4d2e45-798e-fdc1-82fb-8413d5a9e061@redhat.com> Date: Mon, 1 Nov 2021 11:20:27 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH v4 04/11] regulator: Introduce tps68470-regulator driver Content-Language: en-US To: Andy Shevchenko Cc: "Rafael J . Wysocki" , Mark Gross , Andy Shevchenko , Wolfram Sang , Mika Westerberg , Daniel Scally , Laurent Pinchart , Mauro Carvalho Chehab , Liam Girdwood , Mark Brown , Michael Turquette , Stephen Boyd , Len Brown , ACPI Devel Maling List , Platform Driver , Linux Kernel Mailing List , linux-i2c , Sakari Ailus , Kate Hsuan , Linux Media Mailing List , linux-clk References: <20211025094119.82967-1-hdegoede@redhat.com> <20211025094119.82967-5-hdegoede@redhat.com> From: Hans de Goede In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Hi, On 10/25/21 13:11, Andy Shevchenko wrote: > On Mon, Oct 25, 2021 at 12:41 PM Hans de Goede wrote: >> >> The TPS68470 PMIC provides Clocks, GPIOs and Regulators. At present in >> the kernel the Regulators and Clocks are controlled by an OpRegion >> driver designed to work with power control methods defined in ACPI, but >> some platforms lack those methods, meaning drivers need to be able to >> consume the resources of these chips through the usual frameworks. >> >> This commit adds a driver for the regulators provided by the tps68470, >> and is designed to bind to the platform_device registered by the >> intel_skl_int3472 module. >> >> This is based on this out of tree driver written by Intel: >> https://github.com/intel/linux-intel-lts/blob/4.14/base/drivers/regulator/tps68470-regulator.c >> with various cleanups added. > >> +struct tps68470_regulator_data { >> + struct clk *clk; >> +}; > > ... > >> +/* >> + * (1) This register must have same setting as VIOVAL if S_IO LDO is used to >> + * power daisy chained IOs in the receive side. >> + * (2) If there is no I2C daisy chain it can be set freely. > >> + * > > Redundant empty line. > >> + */ > > ... > >> + struct tps68470_regulator_platform_data *pdata = pdev->dev.platform_data; > > dev_get_platdata() ? > > ... > >> + data->clk = devm_clk_get(&pdev->dev, "tps68470-clk"); >> + if (IS_ERR(data->clk)) { >> + dev_err(&pdev->dev, "Error getting tps68470-clk\n"); >> + return PTR_ERR(data->clk); >> + } > > return dev_err_probe(...); > > ... > >> + rdev = devm_regulator_register(&pdev->dev, ®ulators[i], &config); >> + if (IS_ERR(rdev)) { >> + dev_err(&pdev->dev, "failed to register %s regulator\n", >> + regulators[i].name); >> + return PTR_ERR(rdev); >> + } > > Ditto. Andy, thank you for all the reviews. I've addressed all your comments in the v5 of this series which I'm preparing now. This also applies to your comments on other patches, except those which I will address in separate emails. Regards, Hans