From: Dmitry Torokhov Date: Mon, 14 Jan 2019 23:33:23 +0000 (-0800) Subject: Merge tag 'v4.20' into for-linus X-Git-Tag: v5.0-rc4~11^2~3 X-Git-Url: https://repo.jachan.dev/J-linux.git/commitdiff_plain/3eb66e91a25497065c5322b1268cbc3953642227?hp=-c Merge tag 'v4.20' into for-linus Sync with mainline to get linux/overflow.h among other things. --- 3eb66e91a25497065c5322b1268cbc3953642227 diff --combined drivers/clk/mmp/clk-of-mmp2.c index 1da50f827a15,d083b860f083..61fefc046ec5 --- a/drivers/clk/mmp/clk-of-mmp2.c +++ b/drivers/clk/mmp/clk-of-mmp2.c @@@ -53,7 -53,6 +53,7 @@@ #define APMU_DISP1 0x110 #define APMU_CCIC0 0x50 #define APMU_CCIC1 0xf4 +#define APMU_SP 0x68 #define MPMU_UART_PLL 0x14 struct mmp2_clk_unit { @@@ -210,8 -209,6 +210,8 @@@ static struct mmp_clk_mix_config ccic1_ .reg_info = DEFINE_MIX_REG_INFO(4, 16, 2, 6, 32), }; +static DEFINE_SPINLOCK(sp_lock); + static struct mmp_param_mux_clk apmu_mux_clks[] = { {MMP2_CLK_DISP0_MUX, "disp0_mux", disp_parent_names, ARRAY_SIZE(disp_parent_names), CLK_SET_RATE_PARENT, APMU_DISP0, 6, 2, 0, &disp0_lock}, {MMP2_CLK_DISP1_MUX, "disp1_mux", disp_parent_names, ARRAY_SIZE(disp_parent_names), CLK_SET_RATE_PARENT, APMU_DISP1, 6, 2, 0, &disp1_lock}, @@@ -230,8 -227,8 +230,8 @@@ static struct mmp_param_gate_clk apmu_g /* The gate clocks has mux parent. */ {MMP2_CLK_SDH0, "sdh0_clk", "sdh_mix_clk", CLK_SET_RATE_PARENT, APMU_SDH0, 0x1b, 0x1b, 0x0, 0, &sdh_lock}, {MMP2_CLK_SDH1, "sdh1_clk", "sdh_mix_clk", CLK_SET_RATE_PARENT, APMU_SDH1, 0x1b, 0x1b, 0x0, 0, &sdh_lock}, - {MMP2_CLK_SDH1, "sdh2_clk", "sdh_mix_clk", CLK_SET_RATE_PARENT, APMU_SDH2, 0x1b, 0x1b, 0x0, 0, &sdh_lock}, - {MMP2_CLK_SDH1, "sdh3_clk", "sdh_mix_clk", CLK_SET_RATE_PARENT, APMU_SDH3, 0x1b, 0x1b, 0x0, 0, &sdh_lock}, + {MMP2_CLK_SDH2, "sdh2_clk", "sdh_mix_clk", CLK_SET_RATE_PARENT, APMU_SDH2, 0x1b, 0x1b, 0x0, 0, &sdh_lock}, + {MMP2_CLK_SDH3, "sdh3_clk", "sdh_mix_clk", CLK_SET_RATE_PARENT, APMU_SDH3, 0x1b, 0x1b, 0x0, 0, &sdh_lock}, {MMP2_CLK_DISP0, "disp0_clk", "disp0_div", CLK_SET_RATE_PARENT, APMU_DISP0, 0x1b, 0x1b, 0x0, 0, &disp0_lock}, {MMP2_CLK_DISP0_SPHY, "disp0_sphy_clk", "disp0_sphy_div", CLK_SET_RATE_PARENT, APMU_DISP0, 0x1024, 0x1024, 0x0, 0, &disp0_lock}, {MMP2_CLK_DISP1, "disp1_clk", "disp1_div", CLK_SET_RATE_PARENT, APMU_DISP1, 0x1b, 0x1b, 0x0, 0, &disp1_lock}, @@@ -242,7 -239,6 +242,7 @@@ {MMP2_CLK_CCIC1, "ccic1_clk", "ccic1_mix_clk", CLK_SET_RATE_PARENT, APMU_CCIC1, 0x1b, 0x1b, 0x0, 0, &ccic1_lock}, {MMP2_CLK_CCIC1_PHY, "ccic1_phy_clk", "ccic1_mix_clk", CLK_SET_RATE_PARENT, APMU_CCIC1, 0x24, 0x24, 0x0, 0, &ccic1_lock}, {MMP2_CLK_CCIC1_SPHY, "ccic1_sphy_clk", "ccic1_sphy_div", CLK_SET_RATE_PARENT, APMU_CCIC1, 0x300, 0x300, 0x0, 0, &ccic1_lock}, + {MMP2_CLK_SP, "sp_clk", NULL, CLK_SET_RATE_PARENT, APMU_SP, 0x1b, 0x1b, 0x0, 0, &sp_lock}, }; static void mmp2_axi_periph_clk_init(struct mmp2_clk_unit *pxa_unit) diff --combined drivers/input/misc/rotary_encoder.c index 72eee6d55527,30ec77ad32c6..d748897bf5e9 --- a/drivers/input/misc/rotary_encoder.c +++ b/drivers/input/misc/rotary_encoder.c @@@ -7,7 -7,7 +7,7 @@@ * state machine code inspired by code from Tim Ruetz * * A generic driver for rotary encoders connected to GPIO lines. - * See file:Documentation/input/rotary-encoder.txt for more information + * See file:Documentation/input/devices/rotary-encoder.rst for more information * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@@ -240,10 -240,8 +240,10 @@@ static int rotary_encoder_probe(struct encoder->gpios = devm_gpiod_get_array(dev, NULL, GPIOD_IN); if (IS_ERR(encoder->gpios)) { - dev_err(dev, "unable to get gpios\n"); - return PTR_ERR(encoder->gpios); + err = PTR_ERR(encoder->gpios); + if (err != -EPROBE_DEFER) + dev_err(dev, "unable to get gpios: %d\n", err); + return err; } if (encoder->gpios->ndescs < 2) { dev_err(dev, "not enough gpios found\n"); @@@ -285,8 -283,8 +285,8 @@@ } encoder->irq = - devm_kzalloc(dev, - sizeof(*encoder->irq) * encoder->gpios->ndescs, + devm_kcalloc(dev, + encoder->gpios->ndescs, sizeof(*encoder->irq), GFP_KERNEL); if (!encoder->irq) return -ENOMEM; diff --combined drivers/input/serio/Kconfig index 5daec8e988c6,d90d9f1098ff..c9c7224d5ae0 --- a/drivers/input/serio/Kconfig +++ b/drivers/input/serio/Kconfig @@@ -47,7 -47,7 +47,7 @@@ config SERIO_SERPOR Say Y here if you plan to use an input device (mouse, joystick, tablet, 6dof) that communicates over the RS232 serial (COM) port. - More information is available: + More information is available: If unsure, say Y. @@@ -78,7 -78,7 +78,7 @@@ config SERIO_PARKB Say Y here if you built a simple parallel port adapter to attach an additional AT keyboard, XT keyboard or PS/2 mouse. - More information is available: + More information is available: If unsure, say N. @@@ -254,6 -254,7 +254,6 @@@ config SERIO_APBPS config SERIO_OLPC_APSP tristate "OLPC AP-SP input support" - depends on OLPC || COMPILE_TEST help Say Y here if you want support for the keyboard and touchpad included in the OLPC XO-1.75 and XO-4 laptops. diff --combined drivers/input/touchscreen/Kconfig index d171e39485d1,2a80675cfd94..068dbbc610fc --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig @@@ -92,6 -92,19 +92,19 @@@ config TOUCHSCREEN_AD7879_SP To compile this driver as a module, choose M here: the module will be called ad7879-spi. + config TOUCHSCREEN_ADC + tristate "Generic ADC based resistive touchscreen" + depends on IIO + select IIO_BUFFER_CB + help + Say Y here if you want to use the generic ADC + resistive touchscreen driver. + + If unsure, say N (but it's safe to say "Y"). + + To compile this driver as a module, choose M here: the + module will be called resistive-adc-touch.ko. + config TOUCHSCREEN_AR1021_I2C tristate "Microchip AR1020/1021 i2c touchscreen" depends on I2C && OF @@@ -683,18 -696,6 +696,18 @@@ config TOUCHSCREEN_EDT_FT5X0 To compile this driver as a module, choose M here: the module will be called edt-ft5x06. +config TOUCHSCREEN_RASPBERRYPI_FW + tristate "Raspberry Pi's firmware base touch screen support" + depends on RASPBERRYPI_FIRMWARE || (RASPBERRYPI_FIRMWARE=n && COMPILE_TEST) + help + Say Y here if you have the official Raspberry Pi 7 inch screen on + your system. + + If unsure, say N. + + To compile this driver as a module, choose M here: the + module will be called raspberrypi-ts. + config TOUCHSCREEN_MIGOR tristate "Renesas MIGO-R touchscreen" depends on (SH_MIGOR || COMPILE_TEST) && I2C diff --combined drivers/input/touchscreen/Makefile index aca7cb04910b,5911a4190cd2..fcc7605fba8d --- a/drivers/input/touchscreen/Makefile +++ b/drivers/input/touchscreen/Makefile @@@ -13,6 -13,7 +13,7 @@@ obj-$(CONFIG_TOUCHSCREEN_AD7877) += ad7 obj-$(CONFIG_TOUCHSCREEN_AD7879) += ad7879.o obj-$(CONFIG_TOUCHSCREEN_AD7879_I2C) += ad7879-i2c.o obj-$(CONFIG_TOUCHSCREEN_AD7879_SPI) += ad7879-spi.o + obj-$(CONFIG_TOUCHSCREEN_ADC) += resistive-adc-touch.o obj-$(CONFIG_TOUCHSCREEN_ADS7846) += ads7846.o obj-$(CONFIG_TOUCHSCREEN_AR1021_I2C) += ar1021_i2c.o obj-$(CONFIG_TOUCHSCREEN_ATMEL_MXT) += atmel_mxt_ts.o @@@ -108,4 -109,3 +109,4 @@@ obj-$(CONFIG_TOUCHSCREEN_ZET6223) += ze obj-$(CONFIG_TOUCHSCREEN_ZFORCE) += zforce_ts.o obj-$(CONFIG_TOUCHSCREEN_COLIBRI_VF50) += colibri-vf50-ts.o obj-$(CONFIG_TOUCHSCREEN_ROHM_BU21023) += rohm_bu21023.o +obj-$(CONFIG_TOUCHSCREEN_RASPBERRYPI_FW) += raspberrypi-ts.o diff --combined include/uapi/linux/input.h index 551866a4f658,fb78f6f500f3..ffab958bc512 --- a/include/uapi/linux/input.h +++ b/include/uapi/linux/input.h @@@ -26,17 -26,13 +26,17 @@@ */ struct input_event { -#if (__BITS_PER_LONG != 32 || !defined(__USE_TIME_BITS64)) && !defined(__KERNEL) +#if (__BITS_PER_LONG != 32 || !defined(__USE_TIME_BITS64)) && !defined(__KERNEL__) struct timeval time; #define input_event_sec time.tv_sec #define input_event_usec time.tv_usec #else __kernel_ulong_t __sec; +#ifdef CONFIG_SPARC64 + unsigned int __usec; +#else __kernel_ulong_t __usec; +#endif #define input_event_sec __sec #define input_event_usec __usec #endif @@@ -274,10 -270,11 +274,11 @@@ struct input_mask /* * MT_TOOL types */ - #define MT_TOOL_FINGER 0 - #define MT_TOOL_PEN 1 - #define MT_TOOL_PALM 2 - #define MT_TOOL_MAX 2 + #define MT_TOOL_FINGER 0x00 + #define MT_TOOL_PEN 0x01 + #define MT_TOOL_PALM 0x02 + #define MT_TOOL_DIAL 0x0a + #define MT_TOOL_MAX 0x0f /* * Values describing the status of a force-feedback effect