mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 20:54:03 +02:00
pps: clients: gpio: Get rid of legacy platform data
Platform data is a legacy interface to supply device properties to the driver. In this case we even don't have in-kernel users for it. Just remove it for good. Acked-by: Rodolfo Giometti <giometti@enneenne.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20210318130321.24227-4-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
fde046a8c4
commit
ee89646619
|
|
@ -16,7 +16,6 @@
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/pps_kernel.h>
|
#include <linux/pps_kernel.h>
|
||||||
#include <linux/pps-gpio.h>
|
|
||||||
#include <linux/gpio/consumer.h>
|
#include <linux/gpio/consumer.h>
|
||||||
#include <linux/list.h>
|
#include <linux/list.h>
|
||||||
#include <linux/of_device.h>
|
#include <linux/of_device.h>
|
||||||
|
|
@ -164,7 +163,6 @@ static int pps_gpio_probe(struct platform_device *pdev)
|
||||||
struct pps_gpio_device_data *data;
|
struct pps_gpio_device_data *data;
|
||||||
int ret;
|
int ret;
|
||||||
int pps_default_params;
|
int pps_default_params;
|
||||||
const struct pps_gpio_platform_data *pdata = pdev->dev.platform_data;
|
|
||||||
|
|
||||||
/* allocate space for device info */
|
/* allocate space for device info */
|
||||||
data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
|
data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
|
||||||
|
|
@ -173,18 +171,9 @@ static int pps_gpio_probe(struct platform_device *pdev)
|
||||||
platform_set_drvdata(pdev, data);
|
platform_set_drvdata(pdev, data);
|
||||||
|
|
||||||
/* GPIO setup */
|
/* GPIO setup */
|
||||||
if (pdata) {
|
ret = pps_gpio_setup(pdev);
|
||||||
data->gpio_pin = pdata->gpio_pin;
|
if (ret)
|
||||||
data->echo_pin = pdata->echo_pin;
|
return -EINVAL;
|
||||||
|
|
||||||
data->assert_falling_edge = pdata->assert_falling_edge;
|
|
||||||
data->capture_clear = pdata->capture_clear;
|
|
||||||
data->echo_active_ms = pdata->echo_active_ms;
|
|
||||||
} else {
|
|
||||||
ret = pps_gpio_setup(pdev);
|
|
||||||
if (ret)
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* IRQ setup */
|
/* IRQ setup */
|
||||||
ret = gpiod_to_irq(data->gpio_pin);
|
ret = gpiod_to_irq(data->gpio_pin);
|
||||||
|
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
||||||
/*
|
|
||||||
* pps-gpio.h -- PPS client for GPIOs
|
|
||||||
*
|
|
||||||
* Copyright (C) 2011 James Nuss <jamesnuss@nanometrics.ca>
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _PPS_GPIO_H
|
|
||||||
#define _PPS_GPIO_H
|
|
||||||
|
|
||||||
struct pps_gpio_platform_data {
|
|
||||||
struct gpio_desc *gpio_pin;
|
|
||||||
struct gpio_desc *echo_pin;
|
|
||||||
bool assert_falling_edge;
|
|
||||||
bool capture_clear;
|
|
||||||
unsigned int echo_active_ms;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* _PPS_GPIO_H */
|
|
||||||
Loading…
Reference in New Issue
Block a user