From: Stephen Rothwell Date: Wed, 20 Feb 2013 04:43:27 +0000 (+1100) Subject: Merge remote-tracking branch 'char-misc/char-misc-next' X-Git-Tag: next-20130220~25 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8cdeb21fd2facf5fc7b03128f09f21f69bc11fcc;p=karo-tx-linux.git Merge remote-tracking branch 'char-misc/char-misc-next' Conflicts: drivers/char/pcmcia/synclink_cs.c drivers/ipack/devices/ipoctal.c drivers/mfd/wm5102-tables.c include/linux/mfd/arizona/pdata.h --- 8cdeb21fd2facf5fc7b03128f09f21f69bc11fcc diff --cc drivers/char/pcmcia/synclink_cs.c index d0c9852ab875,29f6bec9d489..5c5cc00ebb07 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c @@@ -765,8 -771,11 +771,8 @@@ static void bh_handler(struct work_stru struct tty_struct *tty; int action; - if (!info) - return; - if (debug_level >= DEBUG_LEVEL_BH) - printk( "%s(%d):bh_handler(%s) entry\n", + printk("%s(%d):bh_handler(%s) entry\n", __FILE__,__LINE__,info->device_name); info->bh_running = true; @@@ -889,8 -898,16 +896,8 @@@ static void rx_ready_async(MGSLPC_INFO unsigned char data, status, flag; int fifo_count; int work = 0; - struct mgsl_icount *icount = &info->icount; + 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); @@@ -1342,8 -1359,8 +1349,8 @@@ static void shutdown(MGSLPC_INFO * info /* TODO:disable interrupts instead of reset to preserve signal states */ reset_device(info); - if (!tty || tty->termios.c_cflag & HUPCL) { + if (!tty || tty->termios.c_cflag & HUPCL) { - info->serial_signals &= ~(SerialSignal_DTR + SerialSignal_RTS); + info->serial_signals &= ~(SerialSignal_RTS | SerialSignal_DTR); set_signals(info); } @@@ -1405,12 -1422,12 +1412,12 @@@ static void mgslpc_change_params(MGSLPC cflag = tty->termios.c_cflag; - /* if B0 rate (hangup) specified then negate DTR and RTS */ - /* otherwise assert DTR and RTS */ + /* if B0 rate (hangup) specified then negate RTS and DTR */ + /* otherwise assert RTS and DTR */ - if (cflag & CBAUD) + if (cflag & CBAUD) - info->serial_signals |= SerialSignal_RTS + SerialSignal_DTR; + info->serial_signals |= SerialSignal_RTS | SerialSignal_DTR; else - info->serial_signals &= ~(SerialSignal_RTS + SerialSignal_DTR); + info->serial_signals &= ~(SerialSignal_RTS | SerialSignal_DTR); /* byte size and parity */ @@@ -2301,10 -2318,10 +2308,10 @@@ static void mgslpc_set_termios(struct t /* Handle transition to B0 status */ if (old_termios->c_cflag & CBAUD && !(tty->termios.c_cflag & CBAUD)) { - info->serial_signals &= ~(SerialSignal_RTS + SerialSignal_DTR); + info->serial_signals &= ~(SerialSignal_RTS | SerialSignal_DTR); - spin_lock_irqsave(&info->lock,flags); - set_signals(info); - spin_unlock_irqrestore(&info->lock,flags); + spin_lock_irqsave(&info->lock, flags); + set_signals(info); + spin_unlock_irqrestore(&info->lock, flags); } /* Handle transition away from B0 status */ @@@ -2462,13 -2479,13 +2469,13 @@@ static void dtr_rts(struct tty_port *po MGSLPC_INFO *info = container_of(port, MGSLPC_INFO, port); unsigned long flags; - spin_lock_irqsave(&info->lock,flags); + spin_lock_irqsave(&info->lock, flags); if (onoff) - info->serial_signals |= SerialSignal_RTS + SerialSignal_DTR; + info->serial_signals |= SerialSignal_RTS | SerialSignal_DTR; else - info->serial_signals &= ~SerialSignal_RTS + SerialSignal_DTR; + info->serial_signals &= ~(SerialSignal_RTS | SerialSignal_DTR); set_signals(info); - spin_unlock_irqrestore(&info->lock,flags); + spin_unlock_irqrestore(&info->lock, flags); } diff --cc drivers/ipack/devices/ipoctal.c index ab20a0851dd2,a2cf0f240929..141094e7c06e --- a/drivers/ipack/devices/ipoctal.c +++ b/drivers/ipack/devices/ipoctal.c @@@ -133,11 -123,11 +123,11 @@@ static int ipoctal_get_icount(struct tt return 0; } -static void ipoctal_irq_rx(struct ipoctal_channel *channel, - struct tty_struct *tty, u8 sr) +static void ipoctal_irq_rx(struct ipoctal_channel *channel, u8 sr) { + struct tty_port *port = &channel->tty_port; unsigned char value; - unsigned char flag = TTY_NORMAL; + unsigned char flag; u8 isr; do { @@@ -208,11 -188,13 +188,8 @@@ static void ipoctal_irq_tx(struct ipoct static void ipoctal_irq_channel(struct ipoctal_channel *channel) { u8 isr, sr; - struct tty_struct *tty; - - tty = tty_port_tty_get(&channel->tty_port); - if (!tty) - return; - /* If there is no client, skip the check */ - if (!atomic_read(&channel->open)) - return; - + spin_lock(&channel->lock); /* The HW is organized in pair of channels. See which register we need * to read from */ isr = ioread8(&channel->block_regs->r.isr); @@@ -237,7 -219,8 +214,7 @@@ if ((isr & channel->isr_tx_rdy_mask) && (sr & SR_TX_READY)) ipoctal_irq_tx(channel); - tty_flip_buffer_push(&channel->tty_port); - tty_kref_put(tty); + spin_unlock(&channel->lock); } static irqreturn_t ipoctal_irq_handler(void *arg) diff --cc drivers/mfd/wm5102-tables.c index c68727dbdcdd,a396a3ae2045..a433f580aa4c --- a/drivers/mfd/wm5102-tables.c +++ b/drivers/mfd/wm5102-tables.c @@@ -315,13 -316,9 +321,13 @@@ static const struct reg_default wm5102_ { 0x00000218, 0x01A6 }, /* R536 - Mic Bias Ctrl 1 */ { 0x00000219, 0x01A6 }, /* R537 - Mic Bias Ctrl 2 */ { 0x0000021A, 0x01A6 }, /* R538 - Mic Bias Ctrl 3 */ + { 0x00000225, 0x0400 }, /* R549 - HP Ctrl 1L */ + { 0x00000226, 0x0400 }, /* R550 - HP Ctrl 1R */ { 0x00000293, 0x0000 }, /* R659 - Accessory Detect Mode 1 */ { 0x0000029B, 0x0020 }, /* R667 - Headphone Detect 1 */ + { 0x0000029C, 0x0000 }, /* R668 - Headphone Detect 2 */ + { 0x0000029F, 0x0000 }, /* R671 - Headphone Detect Test */ - { 0x000002A2, 0x0000 }, /* R674 - Micd Clamp control */ + { 0x000002A2, 0x0000 }, /* R674 - Micd clamp control */ { 0x000002A3, 0x1102 }, /* R675 - Mic Detect 1 */ { 0x000002A4, 0x009F }, /* R676 - Mic Detect 2 */ { 0x000002A5, 0x0000 }, /* R677 - Mic Detect 3 */ @@@ -1854,11 -1883,8 +1862,12 @@@ static bool wm5102_volatile_register(st case ARIZONA_DSP1_STATUS_1: case ARIZONA_DSP1_STATUS_2: case ARIZONA_DSP1_STATUS_3: + case ARIZONA_DSP1_SCRATCH_0: + case ARIZONA_DSP1_SCRATCH_1: + case ARIZONA_DSP1_SCRATCH_2: + case ARIZONA_DSP1_SCRATCH_3: case ARIZONA_HEADPHONE_DETECT_2: + case ARIZONA_HP_DACVAL: case ARIZONA_MIC_DETECT_3: return true; default: diff --cc include/linux/mfd/arizona/pdata.h index c007712de66c,f8241753415c..455c51d22d6b --- a/include/linux/mfd/arizona/pdata.h +++ b/include/linux/mfd/arizona/pdata.h @@@ -107,13 -96,15 +107,22 @@@ struct arizona_pdata /** Pin state for GPIO pins */ int gpio_defaults[ARIZONA_MAX_GPIO]; + /** + * Maximum number of channels clocks will be generated for, + * useful for systems where and I2S bus with multiple data + * lines is mastered. + */ + int max_channels_clocked[ARIZONA_MAX_AIF]; + + /** GPIO5 is used for jack detection */ + bool jd_gpio5; + + /** Use the headphone detect circuit to identify the accessory */ + bool hpdet_acc_id; + + /** GPIO used for mic isolation with HPDET */ + int hpdet_id_gpio; + /** GPIO for mic detection polarity */ int micd_pol_gpio;