Skip to content

Commit

Permalink
Merge tag 'char-misc-3.6' of git://git.kernel.org/pub/scm/linux/kerne…
Browse files Browse the repository at this point in the history
…l/git/gregkh/char-misc

Pull char/misc driver merge from Greg Kroah-Hartman:
 "Here is the "big" char/misc driver tree update for the 3.7-rc1 merge
  window.

  Nothing major, just a number of driver updates and fixes, all of which
  have been in the linux-next releases for a while now either in my
  tree, or in Andrew's (the lis3l driver changes came from his tree last
  week).

  Signed-off-by: Greg Kroah-Hartman <[email protected]>"

* tag 'char-misc-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (52 commits)
  drivers/misc/lis3lv02d/lis3lv02d_i2c.c: add lis3lv02d device tree init
  drivers/misc/lis3lv02d/lis3lv02d_spi.c: add lis3lv02d device tree init
  drivers/misc/lis3lv02d: remove lis3lv02d driver DT init
  drivers/misc/lis3lv02d/lis3lv02d_spi.c: add DT matching table passthru code
  drivers/misc/lis3lv02d: add generic DT matching code
  lis3lv02d: fix some comments specific to lis331dlh driver
  MISC: hpilo, remove pci_disable_device
  pcmcia: synclink_cs: fix potential tty NULL dereference
  drivers/char/mmtimer.c: Remove useless kfree
  drivers/char: removes unnecessary semicolon
  char/misc: remove CONFIG_EXPERIMENTAL dependencies
  mei: don't print buffer as a string
  mei: struct mei_message_data doesn't have to be packed
  mei: add error messages for open count errors
  misc: use module_spi_driver
  tifm: use module_pci_driver
  misc/at25, dt: Improve at25 SPI eeprom device tree bindings.
  mei: add lynx point pci device ids
  mei: fix max number of open handles
  mei: rename struct pci_dev *mei_device to mei_pdev
  ...
  • Loading branch information
torvalds committed Oct 1, 2012
2 parents 2c0c86d + 5dc2db0 commit 3aebd34
Show file tree
Hide file tree
Showing 43 changed files with 984 additions and 518 deletions.
34 changes: 24 additions & 10 deletions Documentation/devicetree/bindings/misc/at25.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,35 @@
Atmel AT25 eeprom
EEPROMs (SPI) compatible with Atmel at25.

Required properties:
- compatible : "atmel,at25".
- reg : chip select number
- spi-max-frequency : max spi frequency to use
- pagesize : size of the eeprom page
- size : total eeprom size in bytes
- address-width : number of address bits (one of 8, 16, or 24)

Optional properties:
- spi-cpha : SPI shifted clock phase, as per spi-bus bindings.
- spi-cpol : SPI inverse clock polarity, as per spi-bus bindings.
- read-only : this parameter-less property disables writes to the eeprom

Obsolete legacy properties are can be used in place of "size", "pagesize",
"address-width", and "read-only":
- at25,byte-len : total eeprom size in bytes
- at25,addr-mode : addr-mode flags, as defined in include/linux/spi/eeprom.h
- at25,page-size : size of the eeprom page

Examples:
at25@0 {
compatible = "atmel,at25";
reg = <0>
spi-max-frequency = <5000000>;
Additional compatible properties are also allowed.

Example:
at25@0 {
compatible = "atmel,at25", "st,m95256";
reg = <0>
spi-max-frequency = <5000000>;
spi-cpha;
spi-cpol;

at25,byte-len = <0x8000>;
at25,addr-mode = <2>;
at25,page-size = <64>;
};
pagesize = <64>;
size = <32768>;
address-width = <16>;
};
112 changes: 112 additions & 0 deletions Documentation/devicetree/bindings/misc/lis302.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
LIS302 accelerometer devicetree bindings

This device is matched via its bus drivers, and has a number of properties
that apply in on the generic device (independent from the bus).


Required properties for the SPI bindings:
- compatible: should be set to "st,lis3lv02d_spi"
- reg: the chipselect index
- spi-max-frequency: maximal bus speed, should be set to 1000000 unless
constrained by external circuitry
- interrupts: the interrupt generated by the device

Required properties for the I2C bindings:
- compatible: should be set to "st,lis3lv02d"
- reg: i2c slave address
- Vdd-supply: The input supply for Vdd
- Vdd_IO-supply: The input supply for Vdd_IO


Optional properties for all bus drivers:

- st,click-single-{x,y,z}: if present, tells the device to issue an
interrupt on single click events on the
x/y/z axis.
- st,click-double-{x,y,z}: if present, tells the device to issue an
interrupt on double click events on the
x/y/z axis.
- st,click-thresh-{x,y,z}: set the x/y/z axis threshold
- st,click-click-time-limit: click time limit, from 0 to 127.5msec
with step of 0.5 msec
- st,click-latency: click latency, from 0 to 255 msec with
step of 1 msec.
- st,click-window: click window, from 0 to 255 msec with
step of 1 msec.
- st,irq{1,2}-disable: disable IRQ 1/2
- st,irq{1,2}-ff-wu-1: raise IRQ 1/2 on FF_WU_1 condition
- st,irq{1,2}-ff-wu-2: raise IRQ 1/2 on FF_WU_2 condition
- st,irq{1,2}-data-ready: raise IRQ 1/2 on data ready contition
- st,irq{1,2}-click: raise IRQ 1/2 on click condition
- st,irq-open-drain: consider IRQ lines open-drain
- st,irq-active-low: make IRQ lines active low
- st,wu-duration-1: duration register for Free-Fall/Wake-Up
interrupt 1
- st,wu-duration-2: duration register for Free-Fall/Wake-Up
interrupt 2
- st,wakeup-{x,y,z}-{lo,hi}: set wakeup condition on x/y/z axis for
upper/lower limit
- st,highpass-cutoff-hz=: 1, 2, 4 or 8 for 1Hz, 2Hz, 4Hz or 8Hz of
highpass cut-off frequency
- st,hipass{1,2}-disable: disable highpass 1/2.
- st,default-rate=: set the default rate
- st,axis-{x,y,z}=: set the axis to map to the three coordinates
- st,{min,max}-limit-{x,y,z} set the min/max limits for x/y/z axis
(used by self-test)


Example for a SPI device node:

lis302@0 {
compatible = "st,lis302dl-spi";
reg = <0>;
spi-max-frequency = <1000000>;
interrupt-parent = <&gpio>;
interrupts = <104 0>;

st,click-single-x;
st,click-single-y;
st,click-single-z;
st,click-thresh-x = <10>;
st,click-thresh-y = <10>;
st,click-thresh-z = <10>;
st,irq1-click;
st,irq2-click;
st,wakeup-x-lo;
st,wakeup-x-hi;
st,wakeup-y-lo;
st,wakeup-y-hi;
st,wakeup-z-lo;
st,wakeup-z-hi;
};

Example for a I2C device node:

lis331dlh: lis331dlh@18 {
compatible = "st,lis331dlh", "st,lis3lv02d";
reg = <0x18>;
Vdd-supply = <&lis3_reg>;
Vdd_IO-supply = <&lis3_reg>;

st,click-single-x;
st,click-single-y;
st,click-single-z;
st,click-thresh-x = <10>;
st,click-thresh-y = <10>;
st,click-thresh-z = <10>;
st,irq1-click;
st,irq2-click;
st,wakeup-x-lo;
st,wakeup-x-hi;
st,wakeup-y-lo;
st,wakeup-y-hi;
st,wakeup-z-lo;
st,wakeup-z-hi;
st,min-limit-x = <120>;
st,min-limit-y = <120>;
st,min-limit-z = <140>;
st,max-limit-x = <550>;
st,max-limit-y = <550>;
st,max-limit-z = <750>;
};

22 changes: 22 additions & 0 deletions Documentation/devicetree/bindings/w1/w1-gpio.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
w1-gpio devicetree bindings

Required properties:

- compatible: "w1-gpio"
- gpios: one or two GPIO specs:
- the first one is used as data I/O pin
- the second one is optional. If specified, it is used as
enable pin for an external pin pullup.

Optional properties:

- linux,open-drain: if specified, the data pin is considered in
open-drain mode.

Examples:

onewire@0 {
compatible = "w1-gpio";
gpios = <&gpio 126 0>, <&gpio 105 0>;
};

3 changes: 2 additions & 1 deletion Documentation/misc-devices/lis3lv02d
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Kernel driver lis3lv02d
Supported chips:

* STMicroelectronics LIS3LV02DL, LIS3LV02DQ (12 bits precision)
* STMicroelectronics LIS302DL, LIS3L02DQ, LIS331DL (8 bits)
* STMicroelectronics LIS302DL, LIS3L02DQ, LIS331DL (8 bits) and
LIS331DLH (16 bits)

Authors:
Yan Burman <[email protected]>
Expand Down
6 changes: 3 additions & 3 deletions drivers/char/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,8 @@ config APPLICOM
If unsure, say N.

config SONYPI
tristate "Sony Vaio Programmable I/O Control Device support (EXPERIMENTAL)"
depends on EXPERIMENTAL && X86 && PCI && INPUT && !64BIT
tristate "Sony Vaio Programmable I/O Control Device support"
depends on X86 && PCI && INPUT && !64BIT
---help---
This driver enables access to the Sony Programmable I/O Control
Device which can be found in many (all ?) Sony Vaio laptops.
Expand Down Expand Up @@ -566,7 +566,7 @@ source "drivers/char/tpm/Kconfig"

config TELCLOCK
tristate "Telecom clock driver for ATCA SBC"
depends on EXPERIMENTAL && X86
depends on X86
default n
help
The telecom clock device is specific to the MPCBL0010 and MPCBL0050
Expand Down
3 changes: 1 addition & 2 deletions drivers/char/mmtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ static int __init mmtimer_init(void)

/* Allocate list of node ptrs to mmtimer_t's */
timers = kzalloc(sizeof(struct mmtimer_node)*maxn, GFP_KERNEL);
if (timers == NULL) {
if (!timers) {
printk(KERN_ERR "%s: failed to allocate memory for device\n",
MMTIMER_NAME);
goto out3;
Expand All @@ -848,7 +848,6 @@ static int __init mmtimer_init(void)
return 0;

out3:
kfree(timers);
misc_deregister(&mmtimer_miscdev);
out2:
free_irq(SGI_MMTIMER_VECTOR, NULL);
Expand Down
4 changes: 2 additions & 2 deletions drivers/char/nwbutton.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ int button_del_callback (void (*callback) (void))
button_callback_list [lp].count = 0;
callback_count--;
return 0;
};
}
lp--;
};
}
return -EINVAL;
}

Expand Down
20 changes: 13 additions & 7 deletions drivers/char/pcmcia/synclink_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,14 @@ static void rx_ready_async(MGSLPC_INFO *info, int tcd, struct tty_struct *tty)
int work = 0;
struct mgsl_icount *icount = &info->icount;

if (!tty) {
/* tty is not available anymore */
issue_command(info, CHA, CMD_RXRESET);
if (debug_level >= DEBUG_LEVEL_ISR)
printk("%s(%d):rx_ready_async(tty=NULL)\n",__FILE__,__LINE__);
return;
}

if (tcd) {
/* early termination, get FIFO count from RBCL register */
fifo_count = (unsigned char)(read_reg(info, CHA+RBCL) & 0x1f);
Expand Down Expand Up @@ -980,7 +988,7 @@ static void tx_done(MGSLPC_INFO *info, struct tty_struct *tty)
else
#endif
{
if (tty->stopped || tty->hw_stopped) {
if (tty && (tty->stopped || tty->hw_stopped)) {
tx_stop(info);
return;
}
Expand All @@ -1000,7 +1008,7 @@ static void tx_ready(MGSLPC_INFO *info, struct tty_struct *tty)
if (!info->tx_active)
return;
} else {
if (tty->stopped || tty->hw_stopped) {
if (tty && (tty->stopped || tty->hw_stopped)) {
tx_stop(info);
return;
}
Expand Down Expand Up @@ -1050,13 +1058,12 @@ static void cts_change(MGSLPC_INFO *info, struct tty_struct *tty)
wake_up_interruptible(&info->status_event_wait_q);
wake_up_interruptible(&info->event_wait_q);

if (info->port.flags & ASYNC_CTS_FLOW) {
if (tty && (info->port.flags & ASYNC_CTS_FLOW)) {
if (tty->hw_stopped) {
if (info->serial_signals & SerialSignal_CTS) {
if (debug_level >= DEBUG_LEVEL_ISR)
printk("CTS tx start...");
if (tty)
tty->hw_stopped = 0;
tty->hw_stopped = 0;
tx_start(info, tty);
info->pending_bh |= BH_TRANSMIT;
return;
Expand All @@ -1065,8 +1072,7 @@ static void cts_change(MGSLPC_INFO *info, struct tty_struct *tty)
if (!(info->serial_signals & SerialSignal_CTS)) {
if (debug_level >= DEBUG_LEVEL_ISR)
printk("CTS tx stop...");
if (tty)
tty->hw_stopped = 1;
tty->hw_stopped = 1;
tx_stop(info);
}
}
Expand Down
3 changes: 2 additions & 1 deletion drivers/char/ppdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,8 @@ static int __init ppdev_init (void)
err = PTR_ERR(ppdev_class);
goto out_chrdev;
}
if (parport_register_driver(&pp_driver)) {
err = parport_register_driver(&pp_driver);
if (err < 0) {
printk (KERN_WARNING CHRDEV ": unable to register with parport\n");
goto out_class;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ static int rtc_do_ioctl(unsigned int cmd, unsigned long arg, int kernel)
case RTC_IRQP_READ:
case RTC_IRQP_SET:
return -EINVAL;
};
}
}
#endif

Expand Down
4 changes: 3 additions & 1 deletion drivers/char/tlclk.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,8 +784,10 @@ static int __init tlclk_init(void)
}
tlclk_major = ret;
alarm_events = kzalloc( sizeof(struct tlclk_alarms), GFP_KERNEL);
if (!alarm_events)
if (!alarm_events) {
ret = -ENOMEM;
goto out1;
}

/* Read telecom clock IRQ number (Set by BIOS) */
if (!request_region(TLCLK_BASE, 8, "telco_clock")) {
Expand Down
12 changes: 11 additions & 1 deletion drivers/char/virtio_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -1941,7 +1941,17 @@ static int __init init(void)
INIT_LIST_HEAD(&pdrvdata.consoles);
INIT_LIST_HEAD(&pdrvdata.portdevs);

return register_virtio_driver(&virtio_console);
err = register_virtio_driver(&virtio_console);
if (err < 0) {
pr_err("Error %d registering virtio driver\n", err);
goto free;
}
return 0;
free:
if (pdrvdata.debugfs_dir)
debugfs_remove_recursive(pdrvdata.debugfs_dir);
class_destroy(pdrvdata.class);
return err;
}

static void __exit fini(void)
Expand Down
14 changes: 7 additions & 7 deletions drivers/misc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ config ATMEL_TCB_CLKSRC_BLOCK

config IBM_ASM
tristate "Device driver for IBM RSA service processor"
depends on X86 && PCI && INPUT && EXPERIMENTAL
depends on X86 && PCI && INPUT
---help---
This option enables device driver support for in-band access to the
IBM RSA (Condor) service processor in eServer xSeries systems.
Expand Down Expand Up @@ -162,8 +162,8 @@ config SGI_IOC4
Otherwise say N.

config TIFM_CORE
tristate "TI Flash Media interface support (EXPERIMENTAL)"
depends on EXPERIMENTAL && PCI
tristate "TI Flash Media interface support"
depends on PCI
help
If you want support for Texas Instruments(R) Flash Media adapters
you should select this option and then also choose an appropriate
Expand All @@ -178,8 +178,8 @@ config TIFM_CORE
be called tifm_core.

config TIFM_7XX1
tristate "TI Flash Media PCI74xx/PCI76xx host adapter support (EXPERIMENTAL)"
depends on PCI && TIFM_CORE && EXPERIMENTAL
tristate "TI Flash Media PCI74xx/PCI76xx host adapter support"
depends on PCI && TIFM_CORE
default TIFM_CORE
help
This option enables support for Texas Instruments(R) PCI74xx and
Expand All @@ -192,7 +192,7 @@ config TIFM_7XX1

config ICS932S401
tristate "Integrated Circuits ICS932S401"
depends on I2C && EXPERIMENTAL
depends on I2C
help
If you say yes here you get support for the Integrated Circuits
ICS932S401 clock control chips.
Expand Down Expand Up @@ -398,7 +398,7 @@ config EP93XX_PWM

config DS1682
tristate "Dallas DS1682 Total Elapsed Time Recorder with Alarm"
depends on I2C && EXPERIMENTAL
depends on I2C
help
If you say yes here you get support for Dallas Semiconductor
DS1682 Total Elapsed Time Recorder.
Expand Down
Loading

0 comments on commit 3aebd34

Please sign in to comment.