Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp610064lqs; Tue, 5 Mar 2024 10:53:57 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUUrdu31TPgVFzy2Ds5GPJR1EbHWHYj8gF1n9j29PNq0c13ry3LvoNhe5BI5M4EFNkO/crOPHNjI1Bg4qNO/WfF2gf0FU11IZy1uPFRwQ== X-Google-Smtp-Source: AGHT+IEVGerHlrOwlnsHCyX2Yva8zKcebd/DlsNDZ0FfaMrLr9hyoootcQb6q9k+1ftUIEb97PgN X-Received: by 2002:a05:6a20:d38e:b0:1a1:5044:e46c with SMTP id iq14-20020a056a20d38e00b001a15044e46cmr3216460pzb.33.1709664837544; Tue, 05 Mar 2024 10:53:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709664837; cv=pass; d=google.com; s=arc-20160816; b=efVVHv7W6sdEw5zQs5aKo8PZFzwWPYdXrioLDPCVCDSb7x5Bo1ha3lybP8TaoKaN5T diGj69c+HzoUy5K8FteEq+F1tRIT/by9l1/ktP7PUFyWbR31/hUrbPG/xD+iQ6gi6wCP qsX25Ca9yyYAUNJ8bIah26CoVmQohNhN/5nyAmgwUKeoE8vouXBY4FRjz9A/DZKBLv0a 2ynTywxh/7oRw2EcG0TWtcMSAU+8aOCOozPWbm1U9mAIC+k0G8oNmx79V+xN7tqRc0JG cONR/SXdwNwgOTWBbvw7t+cubtaLyzTKHlyYIvsRwCtNEFgtuqdlEhFRdpWaDDulBhtI 5dBQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:references:from:to:subject:cc:message-id:date :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=dks2OPoqszY4gtl403k8F6gGmC1uZy/jgxeo+Bx8K40=; fh=L7S7z6MMwj73qeIopKC5uo99frqVDSdGXe4YAY2VNFg=; b=zyybCBZu7HtKvGwXzlAPpz9vywMk+xMDEmiT+FJCS6+KAyzzlJycH0aAHy3WABaQ2y v4Vr058vfvd+USk23bKFHcDo1EwnNiSCxlAi8AEqRl9x4smpjnlxAaNn9ISyfqMNpS88 UUFITaGYy8l6OK3AyfGDdjJWjHwrBPd88PVhA2X/4siCEqj1ushdDBtBdItwWa2BnvAL j0s6kyBkvu+RrAMRNBoqJvFFIyzj6oJ9sr/I0JOK3c6Sk0SWPOAvfSx3PmQl9ubaq/pi WutcZInV5VjInTH86/1XNjy8WqRn2at1kY0TceXeYzxw11pDr64qn0HGp3qzSEzQPaeE 6gHg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=kIhUI8Fr; arc=pass (i=1 spf=pass spfdomain=gimli.ms.mff.cuni.cz dkim=pass dkdomain=gimli.ms.mff.cuni.cz dmarc=pass fromdomain=gimli.ms.mff.cuni.cz); spf=pass (google.com: domain of linux-kernel+bounces-92855-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92855-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id j6-20020a056a00174600b006e5bccfe925si3782529pfc.254.2024.03.05.10.53.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 10:53:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-92855-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=kIhUI8Fr; arc=pass (i=1 spf=pass spfdomain=gimli.ms.mff.cuni.cz dkim=pass dkdomain=gimli.ms.mff.cuni.cz dmarc=pass fromdomain=gimli.ms.mff.cuni.cz); spf=pass (google.com: domain of linux-kernel+bounces-92855-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92855-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C9396281BA9 for ; Tue, 5 Mar 2024 18:53:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F1DD95BAE6; Tue, 5 Mar 2024 18:53:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=gimli.ms.mff.cuni.cz header.i=@gimli.ms.mff.cuni.cz header.b="kIhUI8Fr" Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D16A51C2BD; Tue, 5 Mar 2024 18:53:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.113.20.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709664802; cv=none; b=I5eR6pFkAcJXxAJxPUvktu+75rSE9Cr6G6zr6af2KE8tV+rwq/96V3GjzTlG9NXd5GYGM7q/XoAe1iaBGz9UYYEb4uoMEPpmDTSELLQ35HcGcdbB4+vvP0T9XoHclhRKWnEy8zERsU+VF6MUslgVpgGMDX9l0yqaiQOjdF0K38I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709664802; c=relaxed/simple; bh=PAjYBfjUZfOfVYAYGp67ZjY5YssOIvuLWF/KNxrjNVI=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:To:From: References:In-Reply-To; b=JdnYBIV7Aw+NHWoP7hdqiTWZRYCcV45PjZ5SWRiLJijAZSoILJ27IhEjy9+/uJk/K8z7yU9zbVfa2VKBthmvhCwZp6p1HkF23v9Y0XhYN8PJKI3wB0qwMGWPI4sEtay8LVSaiNr5aIlPYmwdAg6/sbq4p/EMqf25x8ebwTkx2hM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gimli.ms.mff.cuni.cz; spf=pass smtp.mailfrom=gimli.ms.mff.cuni.cz; dkim=pass (1024-bit key) header.d=gimli.ms.mff.cuni.cz header.i=@gimli.ms.mff.cuni.cz header.b=kIhUI8Fr; arc=none smtp.client-ip=195.113.20.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gimli.ms.mff.cuni.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gimli.ms.mff.cuni.cz Received: from gimli.ms.mff.cuni.cz (gimli.ms.mff.cuni.cz [195.113.20.176]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by nikam.ms.mff.cuni.cz (Postfix) with ESMTPS id 5195128443D; Tue, 5 Mar 2024 19:53:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gimli.ms.mff.cuni.cz; s=gen1; t=1709664796; 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=dks2OPoqszY4gtl403k8F6gGmC1uZy/jgxeo+Bx8K40=; b=kIhUI8FrDeRNhFpoEApUP5Tyzna549ZwD7ewVoB7kE9J9TrvfSDh9hdtq390wgkyjbumjt MalmDgC6PilHQZ8HG4SSYL7Ddcndbr0FJjLIeakLO4trHcbP/wRvuMX0FAb/H4Xdv17dci P15t6/clg2eCRrI/o3dQ4hRxvSkxnSg= Received: from localhost (koleje-wifi-0023.koleje.cuni.cz [78.128.191.23]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: karelb) by gimli.ms.mff.cuni.cz (Postfix) with ESMTPSA id 26124458158; Tue, 5 Mar 2024 19:53:16 +0100 (CET) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 05 Mar 2024 19:53:52 +0100 Message-Id: Cc: "Rob Herring" , "Krzysztof Kozlowski" , "Conor Dooley" , "Dmitry Torokhov" , "Liam Girdwood" , "Mark Brown" , , , , =?utf-8?q?Duje_Mihanovi=C4=87?= , <~postmarketos/upstreaming@lists.sr.ht>, Subject: Re: [RFC PATCH v3 2/5] mfd: add driver for Marvell 88PM886 PMIC To: "Lee Jones" From: "Karel Balej" References: <20240303101506.4187-1-karelb@gimli.ms.mff.cuni.cz> <20240303101506.4187-3-karelb@gimli.ms.mff.cuni.cz> <20240305114418.GB86322@google.com> In-Reply-To: <20240305114418.GB86322@google.com> Lee Jones, 2024-03-05T11:44:18+00:00: > > +static struct mfd_cell pm886_devs[] =3D { > > + { > > + .name =3D "88pm886-onkey", > > + .num_resources =3D ARRAY_SIZE(pm886_onkey_resources), > > + .resources =3D pm886_onkey_resources, > > + }, > > + { > > + .name =3D "88pm886-regulator", > > + .id =3D PM886_REGULATOR_ID_LDO2, > > Why doesn't PLATFORM_DEVID_AUTO work for this device? Because I am using the IDs in the regulator driver to determine which regulator data to use/which regulator to register. > > +static int pm886_initialize_subregmaps(struct pm886_chip *chip) > > +{ > > + struct device *dev =3D &chip->client->dev; > > + struct i2c_client *page; > > + struct regmap *regmap; > > + int err; > > + > > + /* regulators page */ > > + page =3D devm_i2c_new_dummy_device(dev, chip->client->adapter, > > + chip->client->addr + PM886_PAGE_OFFSET_REGULATORS); > > + if (IS_ERR(page)) { > > + err =3D PTR_ERR(page); > > + dev_err(dev, "Failed to initialize regulators client: %d\n", err); > > + return err; > > + } > > + regmap =3D devm_regmap_init_i2c(page, &pm886_i2c_regmap); > > + if (IS_ERR(regmap)) { > > + err =3D PTR_ERR(regmap); > > + dev_err(dev, "Failed to initialize regulators regmap: %d\n", err); > > + return err; > > + } > > + chip->regmaps[PM886_REGMAP_REGULATORS] =3D regmap; > > Except for the regulator driver, where else is the regulators regmap used= ? Nowhere, at least as of now. So you are saying that I should initialize the regmap in the regulator driver? Thank you, K. B.