From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Jaewon Kim <jaewon02.kim@samsung.com>,
Hyunhee Kim <hyunhee.kim@samsung.com>,
Chanwoo Choi <cw00.choi@samsung.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>,
Pankaj Dubey <pankaj.dubey@samsung.com>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] Input: regulator-haptic - drop platform data support
Date: Wed, 11 Nov 2026 22:51:14 -0800 [thread overview]
Message-ID: <20261112065115.1803973-2-dmitry.torokhov@gmail.com> (raw)
In-Reply-To: <20261112065115.1803973-1-dmitry.torokhov@gmail.com>
All users configure regulator-haptic devices via Device Tree, and there
are no in-tree board files providing platform data. Remove platform data
support, call regulator_haptic_parse_dt() directly from the probe
routine, and remove the unused header file.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
drivers/input/misc/regulator-haptic.c | 20 ++++----------
.../linux/platform_data/regulator-haptic.h | 26 -------------------
2 files changed, 5 insertions(+), 41 deletions(-)
delete mode 100644 include/linux/platform_data/regulator-haptic.h
diff --git a/drivers/input/misc/regulator-haptic.c b/drivers/input/misc/regulator-haptic.c
index b1aa3488ed6c..d99f716ef44b 100644
--- a/drivers/input/misc/regulator-haptic.c
+++ b/drivers/input/misc/regulator-haptic.c
@@ -10,7 +10,6 @@
#include <linux/input.h>
#include <linux/module.h>
#include <linux/of.h>
-#include <linux/platform_data/regulator-haptic.h>
#include <linux/platform_device.h>
#include <linux/regulator/consumer.h>
#include <linux/slab.h>
@@ -112,8 +111,8 @@ static void regulator_haptic_close(struct input_dev *input)
regulator_haptic_set_voltage(haptic, 0);
}
-static int __maybe_unused
-regulator_haptic_parse_dt(struct device *dev, struct regulator_haptic *haptic)
+static int regulator_haptic_parse_dt(struct device *dev,
+ struct regulator_haptic *haptic)
{
struct device_node *node;
int error;
@@ -141,7 +140,6 @@ regulator_haptic_parse_dt(struct device *dev, struct regulator_haptic *haptic)
static int regulator_haptic_probe(struct platform_device *pdev)
{
- const struct regulator_haptic_data *pdata = dev_get_platdata(&pdev->dev);
struct regulator_haptic *haptic;
struct input_dev *input_dev;
int error;
@@ -155,17 +153,9 @@ static int regulator_haptic_probe(struct platform_device *pdev)
mutex_init(&haptic->mutex);
INIT_WORK(&haptic->work, regulator_haptic_work);
- if (pdata) {
- haptic->max_volt = pdata->max_volt;
- haptic->min_volt = pdata->min_volt;
- } else if (IS_ENABLED(CONFIG_OF)) {
- error = regulator_haptic_parse_dt(&pdev->dev, haptic);
- if (error)
- return error;
- } else {
- dev_err(&pdev->dev, "Missing platform data\n");
- return -EINVAL;
- }
+ error = regulator_haptic_parse_dt(&pdev->dev, haptic);
+ if (error)
+ return error;
haptic->regulator = devm_regulator_get_exclusive(&pdev->dev, "haptic");
if (IS_ERR(haptic->regulator)) {
diff --git a/include/linux/platform_data/regulator-haptic.h b/include/linux/platform_data/regulator-haptic.h
deleted file mode 100644
index 4213e1b01316..000000000000
--- a/include/linux/platform_data/regulator-haptic.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Regulator Haptic Platform Data
- *
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
- * Author: Jaewon Kim <jaewon02.kim@samsung.com>
- * Author: Hyunhee Kim <hyunhee.kim@samsung.com>
- */
-
-#ifndef _REGULATOR_HAPTIC_H
-#define _REGULATOR_HAPTIC_H
-
-/*
- * struct regulator_haptic_data - Platform device data
- *
- * @max_volt: maximum voltage value supplied to the haptic motor.
- * <The unit of the voltage is a micro>
- * @min_volt: minimum voltage value supplied to the haptic motor.
- * <The unit of the voltage is a micro>
- */
-struct regulator_haptic_data {
- unsigned int max_volt;
- unsigned int min_volt;
-};
-
-#endif /* _REGULATOR_HAPTIC_H */
--
2.56.0.567.gdb80ae8cd5-goog
next prev parent reply other threads:[~2026-11-12 6:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 6:51 [PATCH 0/2] Input: regulator-haptic - drop platform data support and style fixes Dmitry Torokhov
2026-11-12 6:51 ` Dmitry Torokhov [this message]
2026-11-12 6:51 ` [PATCH 2/2] Input: regulator-haptic - fix coding style issues Dmitry Torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261112065115.1803973-2-dmitry.torokhov@gmail.com \
--to=dmitry.torokhov@gmail.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=cw00.choi@samsung.com \
--cc=hyunhee.kim@samsung.com \
--cc=jaewon02.kim@samsung.com \
--cc=krzk@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pankaj.dubey@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox