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 7D97CC43219 for ; Mon, 1 Nov 2021 10:20:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6427061051 for ; Mon, 1 Nov 2021 10:20:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231946AbhKAKXG (ORCPT ); Mon, 1 Nov 2021 06:23:06 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:40850 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231868AbhKAKXE (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-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-560-bwrexzPOPTO8XqeJ1YAc3Q-1; Mon, 01 Nov 2021 06:20:30 -0400 X-MC-Unique: bwrexzPOPTO8XqeJ1YAc3Q-1 Received: by mail-ed1-f69.google.com with SMTP id v9-20020a50d849000000b003dcb31eabaaso15178752edj.13 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=l3VHe3LmAOHO2BmGTJCA6W3da3WaMcLkWyiFo22VwHxInUVPWWTgq1vS6l0TM6vB37 Co+dHAED5hRJNDqOzcJGn0FfHPa6gATwnDxQEJHS29THB9uhIIKt0XbwkrlmM/YWlUDl 2BYo/bI4sbRMcMDtpifAGmh8QW+QnaTpJR6dGm2Z/FluWUo6KU/U6zjCrdC4AegO+y4s md22yVVLITpuoxIADAOimRfVirE7dqtaokQiPlzr45o8GeE0ifK9NQT8tTGRGzl+4HJN 76PxJ1HNHqNhUJzxTDhtEhxZYSXRcYT9EOqs2wizpmiYsjDRYd+dYSeP7+OU44vk5mW9 KKBA== X-Gm-Message-State: AOAM531mrtnHyx84v2+/M/1GsEO9s+VHuykHcHqbYa69FGaZ1w6WvF6X NKF/QQkpjAiVbf59GSn5rBag3QAHjmV5erV16Nctbs0Pqbs72nPleJXvJnik4a98yPbYvfbNY43 22yvYkLaDipyzIZyMLjQbTA== X-Received: by 2002:a17:907:6da4:: with SMTP id sb36mr35639747ejc.490.1635762029169; 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-acpi@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