mirror of
https://github.com/torvalds/linux.git
synced 2024-09-23 16:33:16 +00:00
extcon: gpio: Fix minor coding style and remove the unused fields.
This patch fixes the minor coding style about indentation and removes the unused fields from struct gpio_extcon_platform_data. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
This commit is contained in:
parent
ce6f749605
commit
6ba129974a
|
@ -1,7 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* drivers/extcon/extcon_gpio.c
|
* extcon_gpio.c - Single-state GPIO extcon driver based on extcon class
|
||||||
*
|
|
||||||
* Single-state GPIO extcon driver based on extcon class
|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008 Google, Inc.
|
* Copyright (C) 2008 Google, Inc.
|
||||||
* Author: Mike Lockwood <lockwood@android.com>
|
* Author: Mike Lockwood <lockwood@android.com>
|
||||||
|
@ -17,8 +15,7 @@
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*/
|
||||||
*/
|
|
||||||
|
|
||||||
#include <linux/extcon.h>
|
#include <linux/extcon.h>
|
||||||
#include <linux/extcon/extcon-gpio.h>
|
#include <linux/extcon/extcon-gpio.h>
|
||||||
|
@ -37,7 +34,7 @@ struct gpio_extcon_data {
|
||||||
struct delayed_work work;
|
struct delayed_work work;
|
||||||
unsigned long debounce_jiffies;
|
unsigned long debounce_jiffies;
|
||||||
|
|
||||||
struct gpio_extcon_platform_data *pdata;
|
struct gpio_extcon_pdata *pdata;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void gpio_extcon_work(struct work_struct *work)
|
static void gpio_extcon_work(struct work_struct *work)
|
||||||
|
@ -64,7 +61,7 @@ static irqreturn_t gpio_irq_handler(int irq, void *dev_id)
|
||||||
|
|
||||||
static int gpio_extcon_probe(struct platform_device *pdev)
|
static int gpio_extcon_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct gpio_extcon_platform_data *pdata = dev_get_platdata(&pdev->dev);
|
struct gpio_extcon_pdata *pdata = dev_get_platdata(&pdev->dev);
|
||||||
struct gpio_extcon_data *data;
|
struct gpio_extcon_data *data;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* External connector (extcon) class generic GPIO driver
|
* Single-state GPIO extcon driver based on extcon class
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012 Samsung Electronics
|
* Copyright (C) 2012 Samsung Electronics
|
||||||
* Author: MyungJoo Ham <myungjoo.ham@samsung.com>
|
* Author: MyungJoo Ham <myungjoo.ham@samsung.com>
|
||||||
|
@ -16,16 +16,14 @@
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*/
|
||||||
*/
|
|
||||||
#ifndef __EXTCON_GPIO_H__
|
#ifndef __EXTCON_GPIO_H__
|
||||||
#define __EXTCON_GPIO_H__ __FILE__
|
#define __EXTCON_GPIO_H__ __FILE__
|
||||||
|
|
||||||
#include <linux/extcon.h>
|
#include <linux/extcon.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct gpio_extcon_platform_data - A simple GPIO-controlled extcon device.
|
* struct gpio_extcon_pdata - A simple GPIO-controlled extcon device.
|
||||||
* @name: The name of this GPIO extcon device.
|
|
||||||
* @extcon_id: The unique id of specific external connector.
|
* @extcon_id: The unique id of specific external connector.
|
||||||
* @gpio: Corresponding GPIO.
|
* @gpio: Corresponding GPIO.
|
||||||
* @gpio_active_low: Boolean describing whether gpio active state is 1 or 0
|
* @gpio_active_low: Boolean describing whether gpio active state is 1 or 0
|
||||||
|
@ -33,28 +31,16 @@
|
||||||
* If false, high state of gpio means active.
|
* If false, high state of gpio means active.
|
||||||
* @debounce: Debounce time for GPIO IRQ in ms.
|
* @debounce: Debounce time for GPIO IRQ in ms.
|
||||||
* @irq_flags: IRQ Flags (e.g., IRQF_TRIGGER_LOW).
|
* @irq_flags: IRQ Flags (e.g., IRQF_TRIGGER_LOW).
|
||||||
* @state_on: print_state is overriden with state_on if attached.
|
|
||||||
* If NULL, default method of extcon class is used.
|
|
||||||
* @state_off: print_state is overriden with state_off if detached.
|
|
||||||
* If NUll, default method of extcon class is used.
|
|
||||||
* @check_on_resume: Boolean describing whether to check the state of gpio
|
* @check_on_resume: Boolean describing whether to check the state of gpio
|
||||||
* while resuming from sleep.
|
* while resuming from sleep.
|
||||||
*
|
|
||||||
* Note that in order for state_on or state_off to be valid, both state_on
|
|
||||||
* and state_off should be not NULL. If at least one of them is NULL,
|
|
||||||
* the print_state is not overriden.
|
|
||||||
*/
|
*/
|
||||||
struct gpio_extcon_platform_data {
|
struct gpio_extcon_pdata {
|
||||||
const char *name;
|
|
||||||
unsigned int extcon_id;
|
unsigned int extcon_id;
|
||||||
unsigned gpio;
|
unsigned gpio;
|
||||||
bool gpio_active_low;
|
bool gpio_active_low;
|
||||||
unsigned long debounce;
|
unsigned long debounce;
|
||||||
unsigned long irq_flags;
|
unsigned long irq_flags;
|
||||||
|
|
||||||
/* if NULL, "0" or "1" will be printed */
|
|
||||||
const char *state_on;
|
|
||||||
const char *state_off;
|
|
||||||
bool check_on_resume;
|
bool check_on_resume;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user