From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC7F04D9F7B for ; Wed, 14 Oct 2026 12:16:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791980168; cv=none; b=IIEKVFT7Ne4yyj7HMcf7Tr7vIwcrLGEzRbVc0XuYTiH8OkBZTYad+wxWhFJlFci8xB7xD7IcYZzBtVpmnUnkghW0GkQcwRHZ7DRca4lqKwDnVFei5LVWzqt27cFcH9/hRpRNO4MQ/GjsQF0wvU2LUz/Ik/M5R+B4Z46KIJ+xllk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791980168; c=relaxed/simple; bh=LUJoAfm8d9DBAnqMkyJ1+9asGnatYQIAciuxSlDdENQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SDoYOxfpF9Ngne/sI+4jKA14usSODncqqWQXcl9SpDhko32vsyfqHFj2EUjl/130wkFTA0Ypdf1fwlyUCvZAOX4okJI+3dyaSQokd6w9WBYi+fvC0RYatPv640fiHHfsH1wkJ8mgPR46NwE38j5FIjE4TFzBVjFHZKdAQqlir9Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=XHHPLb7+; arc=none smtp.client-ip=209.85.128.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XHHPLb7+" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-49e73611928so37760995e9.1 for ; Wed, 14 Oct 2026 05:16:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1791980165; x=1792584965; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=eBC/FZXgBVy2qPIQx5Do4tZv6p6o386K0itsEb4weH0=; b=XHHPLb7+gjAHBa6y87eTX4Y17wbqGd0yAzETfem9bUhxOidACkUXPL+8PFn5TIs9DO Am5WZ7H4o6fFnTWOxLDpPlfmkp/ijZZHUzdyHs1NzIVZvPSA8OgL4gbus0pKW4G10ly1 hH5Pv2jFRGWKdbK3B/xipEyRv8/L5gZPhq1hlwMuAGRiG6zKKqFOpXcZA/bjRNINUgqS JHE0Z82bpzUm8ULbRgdXXmruPM4L9c51lQ+jz98fkcR3mBW17GOviCKxbYc+gVj68FWo Kr6xWMgcqMQ/FmaSwLobwE37I0vwacud0kukcGJ41a87bZWuWhbH1FAEdHN16xxRShXx OIyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791980165; x=1792584965; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=eBC/FZXgBVy2qPIQx5Do4tZv6p6o386K0itsEb4weH0=; b=TJrq3ZelNxyX/pJKBHsT4h1Vc2o8C7pfPgnA6Hh7zSNLAqLvRx5MWfj86do19tZLgV yplxrAXRYFuzA1TA1EhRNInFdxwsR9tNPwehG5TjHA3MKRK5V2/vKnnDMEHgIM+zzNSc lUowfpjma2UrDNPyNk7LK9nUrSqzMARx9xwXlwxsvGeLZm8bP8EjbGsYQ/qsVUzcDHpk Nc0qiAzfnBIC9ZlPiqhuUc2JwrUrsW68YSz28dg3eNH8t9RLMDI5+KaXY5bb5DlpFgaB RpLIbJwZIBzXVTPkEdOp4D2kP5/6LeKzQ4SLOfCAI2DI533C2P7YnQsiFJuXrh/Ye2gf tMlw== X-Forwarded-Encrypted: i=1; AKwUvBwQQSeZmFraFR7+tZGmJU1A4Ss5kpUASxAN55EByk+0jR12brCdvufMBT2Y2NMeFR57EojZl5+qfPwI@vger.kernel.org X-Gm-Message-State: AFq9FYIX697inusLuxliFyYWb2CQQmHC97JbXmK4jbwBa4baygVWizhU oF1GCE6yCODH6urMC3l8OrNPGSb2drHhvSCHtshUECT1ISbJJ39VxkvS X-Gm-Gg: AYBFou29P+zSMeclaTjTer72syS71D8JKlnnF41sCPqMyBlCjW0auI1ne/xk+NFMd5X QJiY6gJT4Flt2TQ1QmrmoNaG/I20DQt28Riu+NPO5zdrtFdnBEao9oCcKI7EnAaerWpphXELd7s WFh6/LsWvlXNt0youp24vaA7J6leoEluH4d2tOCIP1bLsmjTnb6orIlJBSBPU+9v9jwwmFl87Nq XDS7NYVjkI0uo+0r0sM0FJtsKSH6nb/EpjcXuJekcyzA5YIXU6bJwwhCMULRFIANkh4iHvQzySm 1YVKZ0W29zwJmFeY0z2fX59Vckf81+HpiJmY5GbWN79IDHLD84W5XZPIXv3MYEnPiSI3r6vUJEE GQqWYFIYVK26ye3HZVfIEqouPoM7ENbV8nbEJAgjMY+OaXaigmIaRaU/lNIijVOZmCGLCiuuz6R PjVQSLvlldzZquHO3hlRocIJtjcbgFmTE4hYrROMrDWaDqmFORX8R+BD0Lc1CaRJTuYQr44ZWGP 5Rd79CNl07nDB0/dn0= X-Received: by 2002:a5d:5e88:0:b0:48d:bafc:a3f6 with SMTP id ffacd0b85a97d-48dbafca4a1mr32494960f8f.0.1791980164766; Wed, 14 Oct 2026 05:16:04 -0700 (PDT) Received: from xeon ([188.163.112.62]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48de0ac36f9sm11006660f8f.36.2026.10.14.05.16.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Oct 2026 05:16:03 -0700 (PDT) From: Svyatoslav Ryhel To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Svyatoslav Ryhel Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, mfd@lists.linux.dev Subject: [PATCH v2 2/3 RESEND] mfd: max8907: Remove platform_data based probing Date: Wed, 14 Oct 2026 15:15:43 +0300 Message-ID: <20261014121544.138958-3-clamor95@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261014121544.138958-1-clamor95@gmail.com> References: <20261014121544.138958-1-clamor95@gmail.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit There are no in-tree users of this driver, but it supports devicetree based probing, which means external dtb files may exist that work with this. Remove the unused legacy code and make this a DT-only driver. Signed-off-by: Svyatoslav Ryhel --- drivers/mfd/max8907.c | 8 +------- drivers/regulator/max8907-regulator.c | 8 +++----- include/linux/mfd/max8907.h | 5 ----- 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/drivers/mfd/max8907.c b/drivers/mfd/max8907.c index 7bac1d6517717..363ac80c0593b 100644 --- a/drivers/mfd/max8907.c +++ b/drivers/mfd/max8907.c @@ -184,13 +184,7 @@ static int max8907_i2c_probe(struct i2c_client *i2c) { struct max8907 *max8907; int ret; - struct max8907_platform_data *pdata = dev_get_platdata(&i2c->dev); - bool pm_off = false; - - if (pdata) - pm_off = pdata->pm_off; - else if (i2c->dev.of_node) - pm_off = of_property_read_bool(i2c->dev.of_node, + bool pm_off = of_property_read_bool(i2c->dev.of_node, "maxim,system-power-controller"); max8907 = devm_kzalloc(&i2c->dev, sizeof(struct max8907), GFP_KERNEL); diff --git a/drivers/regulator/max8907-regulator.c b/drivers/regulator/max8907-regulator.c index e59aa7a3ee546..907ed3fca5e97 100644 --- a/drivers/regulator/max8907-regulator.c +++ b/drivers/regulator/max8907-regulator.c @@ -274,7 +274,6 @@ static inline struct device_node *match_of_node(int index) static int max8907_regulator_probe(struct platform_device *pdev) { struct max8907 *max8907 = dev_get_drvdata(pdev->dev.parent); - struct max8907_platform_data *pdata = dev_get_platdata(max8907->dev); int ret; struct max8907_regulator *pmic; unsigned int val; @@ -312,10 +311,9 @@ static int max8907_regulator_probe(struct platform_device *pdev) struct regulator_dev *rdev; config.dev = pdev->dev.parent; - if (pdata) - idata = pdata->init_data[i]; - else - idata = match_init_data(i); + + idata = match_init_data(i); + config.init_data = idata; config.driver_data = pmic; config.regmap = max8907->regmap_gen; diff --git a/include/linux/mfd/max8907.h b/include/linux/mfd/max8907.h index 4be3c2370e2a4..e222250f0cc1e 100644 --- a/include/linux/mfd/max8907.h +++ b/include/linux/mfd/max8907.h @@ -227,11 +227,6 @@ enum { MAX8907_IRQ_RTC_ALARM0, }; -struct max8907_platform_data { - struct regulator_init_data *init_data[MAX8907_NUM_REGULATORS]; - bool pm_off; -}; - struct regmap_irq_chips_data; struct max8907 { -- 2.53.0