mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-24 19:40:21 +09:00
Merge tag 'v4.9.276' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into odroidg12-4.9.y
This is the 4.9.276 stable release
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,6 +1,6 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 9
|
||||
SUBLEVEL = 275
|
||||
SUBLEVEL = 276
|
||||
EXTRAVERSION =
|
||||
NAME = Roaring Lionus
|
||||
|
||||
|
||||
@@ -552,7 +552,7 @@ status = "okay";
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&spi0_pins>;
|
||||
ti,pindir-d0-out-d1-in = <1>;
|
||||
ti,pindir-d0-out-d1-in;
|
||||
/* WLS1271 WiFi */
|
||||
wlcore: wlcore@1 {
|
||||
compatible = "ti,wl1271";
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
label = "blue:heartbeat";
|
||||
pwms = <&pwm 2 2000000 0>;
|
||||
pwm-names = "pwm2";
|
||||
max_brightness = <255>;
|
||||
max-brightness = <255>;
|
||||
linux,default-trigger = "heartbeat";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
* Green LED is much brighter than the others
|
||||
* so limit its max brightness
|
||||
*/
|
||||
max_brightness = <127>;
|
||||
max-brightness = <127>;
|
||||
linux,default-trigger = "mmc0";
|
||||
};
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
label = "blue:heartbeat";
|
||||
pwms = <&pwm 2 2000000 0>;
|
||||
pwm-names = "pwm2";
|
||||
max_brightness = <255>;
|
||||
max-brightness = <255>;
|
||||
linux,default-trigger = "heartbeat";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
status = "okay";
|
||||
|
||||
clocks = <&mstp1_clks R8A7779_CLK_DU>, <&x3_clk>;
|
||||
clock-names = "du", "dclkin.0";
|
||||
clock-names = "du.0", "dclkin.0";
|
||||
|
||||
ports {
|
||||
port@0 {
|
||||
|
||||
@@ -431,6 +431,7 @@
|
||||
reg = <0 0xfff80000 0 0x40000>;
|
||||
interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&mstp1_clks R8A7779_CLK_DU>;
|
||||
clock-names = "du.0";
|
||||
power-domains = <&sysc R8A7779_PD_ALWAYS_ON>;
|
||||
status = "disabled";
|
||||
|
||||
|
||||
@@ -1371,7 +1371,7 @@
|
||||
0xffffffff 0x3ffcfe7c 0x1c010101 /* pioA */
|
||||
0x7fffffff 0xfffccc3a 0x3f00cc3a /* pioB */
|
||||
0xffffffff 0x3ff83fff 0xff00ffff /* pioC */
|
||||
0x0003ff00 0x8002a800 0x00000000 /* pioD */
|
||||
0xb003ff00 0x8002a800 0x00000000 /* pioD */
|
||||
0xffffffff 0x7fffffff 0x76fff1bf /* pioE */
|
||||
>;
|
||||
|
||||
|
||||
@@ -444,21 +444,21 @@ void kprobe_thumb32_test_cases(void)
|
||||
"3: mvn r0, r0 \n\t"
|
||||
"2: nop \n\t")
|
||||
|
||||
TEST_RX("tbh [pc, r",7, (9f-(1f+4))>>1,"]",
|
||||
TEST_RX("tbh [pc, r",7, (9f-(1f+4))>>1,", lsl #1]",
|
||||
"9: \n\t"
|
||||
".short (2f-1b-4)>>1 \n\t"
|
||||
".short (3f-1b-4)>>1 \n\t"
|
||||
"3: mvn r0, r0 \n\t"
|
||||
"2: nop \n\t")
|
||||
|
||||
TEST_RX("tbh [pc, r",12, ((9f-(1f+4))>>1)+1,"]",
|
||||
TEST_RX("tbh [pc, r",12, ((9f-(1f+4))>>1)+1,", lsl #1]",
|
||||
"9: \n\t"
|
||||
".short (2f-1b-4)>>1 \n\t"
|
||||
".short (3f-1b-4)>>1 \n\t"
|
||||
"3: mvn r0, r0 \n\t"
|
||||
"2: nop \n\t")
|
||||
|
||||
TEST_RRX("tbh [r",1,9f, ", r",14,1,"]",
|
||||
TEST_RRX("tbh [r",1,9f, ", r",14,1,", lsl #1]",
|
||||
"9: \n\t"
|
||||
".short (2f-1b-4)>>1 \n\t"
|
||||
".short (3f-1b-4)>>1 \n\t"
|
||||
@@ -471,10 +471,10 @@ void kprobe_thumb32_test_cases(void)
|
||||
|
||||
TEST_UNSUPPORTED("strexb r0, r1, [r2]")
|
||||
TEST_UNSUPPORTED("strexh r0, r1, [r2]")
|
||||
TEST_UNSUPPORTED("strexd r0, r1, [r2]")
|
||||
TEST_UNSUPPORTED("strexd r0, r1, r2, [r2]")
|
||||
TEST_UNSUPPORTED("ldrexb r0, [r1]")
|
||||
TEST_UNSUPPORTED("ldrexh r0, [r1]")
|
||||
TEST_UNSUPPORTED("ldrexd r0, [r1]")
|
||||
TEST_UNSUPPORTED("ldrexd r0, r1, [r1]")
|
||||
|
||||
TEST_GROUP("Data-processing (shifted register) and (modified immediate)")
|
||||
|
||||
|
||||
@@ -71,13 +71,8 @@ SECTIONS
|
||||
|
||||
_end = .;
|
||||
|
||||
/DISCARD/ : {
|
||||
EXIT_TEXT
|
||||
EXIT_DATA
|
||||
EXIT_CALL
|
||||
}
|
||||
|
||||
STABS_DEBUG
|
||||
DWARF_DEBUG
|
||||
|
||||
DISCARDS
|
||||
}
|
||||
|
||||
@@ -343,7 +343,7 @@ init_record_index_pools(void)
|
||||
|
||||
/* - 2 - */
|
||||
sect_min_size = sal_log_sect_min_sizes[0];
|
||||
for (i = 1; i < sizeof sal_log_sect_min_sizes/sizeof(size_t); i++)
|
||||
for (i = 1; i < ARRAY_SIZE(sal_log_sect_min_sizes); i++)
|
||||
if (sect_min_size > sal_log_sect_min_sizes[i])
|
||||
sect_min_size = sal_log_sect_min_sizes[i];
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ KBUILD_AFLAGS := $(LINUXINCLUDE) $(KBUILD_AFLAGS) -D__ASSEMBLY__ \
|
||||
KCOV_INSTRUMENT := n
|
||||
|
||||
# decompressor objects (linked with vmlinuz)
|
||||
vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o
|
||||
vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o $(obj)/bswapsi.o
|
||||
|
||||
ifdef CONFIG_DEBUG_ZBOOT
|
||||
vmlinuzobjs-$(CONFIG_DEBUG_ZBOOT) += $(obj)/dbg.o
|
||||
@@ -47,7 +47,7 @@ extra-y += uart-ath79.c
|
||||
$(obj)/uart-ath79.c: $(srctree)/arch/mips/ath79/early_printk.c
|
||||
$(call cmd,shipped)
|
||||
|
||||
vmlinuzobjs-$(CONFIG_KERNEL_XZ) += $(obj)/ashldi3.o $(obj)/bswapsi.o
|
||||
vmlinuzobjs-$(CONFIG_KERNEL_XZ) += $(obj)/ashldi3.o
|
||||
|
||||
extra-y += ashldi3.c bswapsi.c
|
||||
$(obj)/ashldi3.o $(obj)/bswapsi.o: KBUILD_CFLAGS += -I$(srctree)/arch/mips/lib
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
* option) any later version.
|
||||
*/
|
||||
|
||||
#define DISABLE_BRANCH_PROFILING
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/string.h>
|
||||
|
||||
@@ -67,7 +67,13 @@ static inline pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
|
||||
static inline void huge_ptep_clear_flush(struct vm_area_struct *vma,
|
||||
unsigned long addr, pte_t *ptep)
|
||||
{
|
||||
flush_tlb_page(vma, addr & huge_page_mask(hstate_vma(vma)));
|
||||
/*
|
||||
* clear the huge pte entry firstly, so that the other smp threads will
|
||||
* not get old pte entry after finishing flush_tlb_page and before
|
||||
* setting new huge pte entry
|
||||
*/
|
||||
huge_ptep_get_and_clear(vma->vm_mm, addr, ptep);
|
||||
flush_tlb_page(vma, addr);
|
||||
}
|
||||
|
||||
static inline int huge_pte_none(pte_t pte)
|
||||
|
||||
@@ -107,11 +107,15 @@ do { \
|
||||
|
||||
static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address)
|
||||
{
|
||||
pmd_t *pmd;
|
||||
pmd_t *pmd = NULL;
|
||||
struct page *pg;
|
||||
|
||||
pmd = (pmd_t *) __get_free_pages(GFP_KERNEL, PMD_ORDER);
|
||||
if (pmd)
|
||||
pg = alloc_pages(GFP_KERNEL | __GFP_ACCOUNT, PMD_ORDER);
|
||||
if (pg) {
|
||||
pgtable_pmd_page_ctor(pg);
|
||||
pmd = (pmd_t *)page_address(pg);
|
||||
pmd_init((unsigned long)pmd, (unsigned long)invalid_pte_table);
|
||||
}
|
||||
return pmd;
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ static inline const union mips_vdso_data *get_vdso_data(void)
|
||||
|
||||
static inline void __iomem *get_gic(const union mips_vdso_data *data)
|
||||
{
|
||||
return (void __iomem *)data - PAGE_SIZE;
|
||||
return (void __iomem *)((unsigned long)data & PAGE_MASK) - PAGE_SIZE;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_CLKSRC_MIPS_GIC */
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "string.h"
|
||||
#include "stdio.h"
|
||||
#include "ops.h"
|
||||
#include "of.h"
|
||||
|
||||
void dt_fixup_memory(u64 start, u64 size)
|
||||
{
|
||||
@@ -27,21 +28,25 @@ void dt_fixup_memory(u64 start, u64 size)
|
||||
root = finddevice("/");
|
||||
if (getprop(root, "#address-cells", &naddr, sizeof(naddr)) < 0)
|
||||
naddr = 2;
|
||||
else
|
||||
naddr = be32_to_cpu(naddr);
|
||||
if (naddr < 1 || naddr > 2)
|
||||
fatal("Can't cope with #address-cells == %d in /\n\r", naddr);
|
||||
|
||||
if (getprop(root, "#size-cells", &nsize, sizeof(nsize)) < 0)
|
||||
nsize = 1;
|
||||
else
|
||||
nsize = be32_to_cpu(nsize);
|
||||
if (nsize < 1 || nsize > 2)
|
||||
fatal("Can't cope with #size-cells == %d in /\n\r", nsize);
|
||||
|
||||
i = 0;
|
||||
if (naddr == 2)
|
||||
memreg[i++] = start >> 32;
|
||||
memreg[i++] = start & 0xffffffff;
|
||||
memreg[i++] = cpu_to_be32(start >> 32);
|
||||
memreg[i++] = cpu_to_be32(start & 0xffffffff);
|
||||
if (nsize == 2)
|
||||
memreg[i++] = size >> 32;
|
||||
memreg[i++] = size & 0xffffffff;
|
||||
memreg[i++] = cpu_to_be32(size >> 32);
|
||||
memreg[i++] = cpu_to_be32(size & 0xffffffff);
|
||||
|
||||
memory = finddevice("/memory");
|
||||
if (! memory) {
|
||||
@@ -49,9 +54,9 @@ void dt_fixup_memory(u64 start, u64 size)
|
||||
setprop_str(memory, "device_type", "memory");
|
||||
}
|
||||
|
||||
printf("Memory <- <0x%x", memreg[0]);
|
||||
printf("Memory <- <0x%x", be32_to_cpu(memreg[0]));
|
||||
for (i = 1; i < (naddr + nsize); i++)
|
||||
printf(" 0x%x", memreg[i]);
|
||||
printf(" 0x%x", be32_to_cpu(memreg[i]));
|
||||
printf("> (%ldMB)\n\r", (unsigned long)(size >> 20));
|
||||
|
||||
setprop(memory, "reg", memreg, (naddr + nsize)*sizeof(u32));
|
||||
@@ -69,10 +74,10 @@ void dt_fixup_cpu_clocks(u32 cpu, u32 tb, u32 bus)
|
||||
printf("CPU bus-frequency <- 0x%x (%dMHz)\n\r", bus, MHZ(bus));
|
||||
|
||||
while ((devp = find_node_by_devtype(devp, "cpu"))) {
|
||||
setprop_val(devp, "clock-frequency", cpu);
|
||||
setprop_val(devp, "timebase-frequency", tb);
|
||||
setprop_val(devp, "clock-frequency", cpu_to_be32(cpu));
|
||||
setprop_val(devp, "timebase-frequency", cpu_to_be32(tb));
|
||||
if (bus > 0)
|
||||
setprop_val(devp, "bus-frequency", bus);
|
||||
setprop_val(devp, "bus-frequency", cpu_to_be32(bus));
|
||||
}
|
||||
|
||||
timebase_period_ns = 1000000000 / tb;
|
||||
@@ -84,7 +89,7 @@ void dt_fixup_clock(const char *path, u32 freq)
|
||||
|
||||
if (devp) {
|
||||
printf("%s: clock-frequency <- %x (%dMHz)\n\r", path, freq, MHZ(freq));
|
||||
setprop_val(devp, "clock-frequency", freq);
|
||||
setprop_val(devp, "clock-frequency", cpu_to_be32(freq));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,8 +142,12 @@ void dt_get_reg_format(void *node, u32 *naddr, u32 *nsize)
|
||||
{
|
||||
if (getprop(node, "#address-cells", naddr, 4) != 4)
|
||||
*naddr = 2;
|
||||
else
|
||||
*naddr = be32_to_cpu(*naddr);
|
||||
if (getprop(node, "#size-cells", nsize, 4) != 4)
|
||||
*nsize = 1;
|
||||
else
|
||||
*nsize = be32_to_cpu(*nsize);
|
||||
}
|
||||
|
||||
static void copy_val(u32 *dest, u32 *src, int naddr)
|
||||
@@ -167,9 +176,9 @@ static int add_reg(u32 *reg, u32 *add, int naddr)
|
||||
int i, carry = 0;
|
||||
|
||||
for (i = MAX_ADDR_CELLS - 1; i >= MAX_ADDR_CELLS - naddr; i--) {
|
||||
u64 tmp = (u64)reg[i] + add[i] + carry;
|
||||
u64 tmp = (u64)be32_to_cpu(reg[i]) + be32_to_cpu(add[i]) + carry;
|
||||
carry = tmp >> 32;
|
||||
reg[i] = (u32)tmp;
|
||||
reg[i] = cpu_to_be32((u32)tmp);
|
||||
}
|
||||
|
||||
return !carry;
|
||||
@@ -184,18 +193,18 @@ static int compare_reg(u32 *reg, u32 *range, u32 *rangesize)
|
||||
u32 end;
|
||||
|
||||
for (i = 0; i < MAX_ADDR_CELLS; i++) {
|
||||
if (reg[i] < range[i])
|
||||
if (be32_to_cpu(reg[i]) < be32_to_cpu(range[i]))
|
||||
return 0;
|
||||
if (reg[i] > range[i])
|
||||
if (be32_to_cpu(reg[i]) > be32_to_cpu(range[i]))
|
||||
break;
|
||||
}
|
||||
|
||||
for (i = 0; i < MAX_ADDR_CELLS; i++) {
|
||||
end = range[i] + rangesize[i];
|
||||
end = be32_to_cpu(range[i]) + be32_to_cpu(rangesize[i]);
|
||||
|
||||
if (reg[i] < end)
|
||||
if (be32_to_cpu(reg[i]) < end)
|
||||
break;
|
||||
if (reg[i] > end)
|
||||
if (be32_to_cpu(reg[i]) > end)
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -244,7 +253,6 @@ static int dt_xlate(void *node, int res, int reglen, unsigned long *addr,
|
||||
return 0;
|
||||
|
||||
dt_get_reg_format(parent, &naddr, &nsize);
|
||||
|
||||
if (nsize > 2)
|
||||
return 0;
|
||||
|
||||
@@ -256,10 +264,10 @@ static int dt_xlate(void *node, int res, int reglen, unsigned long *addr,
|
||||
|
||||
copy_val(last_addr, prop_buf + offset, naddr);
|
||||
|
||||
ret_size = prop_buf[offset + naddr];
|
||||
ret_size = be32_to_cpu(prop_buf[offset + naddr]);
|
||||
if (nsize == 2) {
|
||||
ret_size <<= 32;
|
||||
ret_size |= prop_buf[offset + naddr + 1];
|
||||
ret_size |= be32_to_cpu(prop_buf[offset + naddr + 1]);
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
@@ -282,7 +290,6 @@ static int dt_xlate(void *node, int res, int reglen, unsigned long *addr,
|
||||
|
||||
offset = find_range(last_addr, prop_buf, prev_naddr,
|
||||
naddr, prev_nsize, buflen / 4);
|
||||
|
||||
if (offset < 0)
|
||||
return 0;
|
||||
|
||||
@@ -300,8 +307,7 @@ static int dt_xlate(void *node, int res, int reglen, unsigned long *addr,
|
||||
if (naddr > 2)
|
||||
return 0;
|
||||
|
||||
ret_addr = ((u64)last_addr[2] << 32) | last_addr[3];
|
||||
|
||||
ret_addr = ((u64)be32_to_cpu(last_addr[2]) << 32) | be32_to_cpu(last_addr[3]);
|
||||
if (sizeof(void *) == 4 &&
|
||||
(ret_addr >= 0x100000000ULL || ret_size > 0x100000000ULL ||
|
||||
ret_addr + ret_size > 0x100000000ULL))
|
||||
@@ -354,11 +360,14 @@ int dt_is_compatible(void *node, const char *compat)
|
||||
int dt_get_virtual_reg(void *node, void **addr, int nres)
|
||||
{
|
||||
unsigned long xaddr;
|
||||
int n;
|
||||
int n, i;
|
||||
|
||||
n = getprop(node, "virtual-reg", addr, nres * 4);
|
||||
if (n > 0)
|
||||
if (n > 0) {
|
||||
for (i = 0; i < n/4; i ++)
|
||||
((u32 *)addr)[i] = be32_to_cpu(((u32 *)addr)[i]);
|
||||
return n / 4;
|
||||
}
|
||||
|
||||
for (n = 0; n < nres; n++) {
|
||||
if (!dt_xlate_reg(node, n, &xaddr, NULL))
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "stdio.h"
|
||||
#include "io.h"
|
||||
#include "ops.h"
|
||||
#include "of.h"
|
||||
|
||||
#define UART_DLL 0 /* Out: Divisor Latch Low */
|
||||
#define UART_DLM 1 /* Out: Divisor Latch High */
|
||||
@@ -57,16 +58,20 @@ int ns16550_console_init(void *devp, struct serial_console_data *scdp)
|
||||
int n;
|
||||
u32 reg_offset;
|
||||
|
||||
if (dt_get_virtual_reg(devp, (void **)®_base, 1) < 1)
|
||||
if (dt_get_virtual_reg(devp, (void **)®_base, 1) < 1) {
|
||||
printf("virt reg parse fail...\r\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
n = getprop(devp, "reg-offset", ®_offset, sizeof(reg_offset));
|
||||
if (n == sizeof(reg_offset))
|
||||
reg_base += reg_offset;
|
||||
reg_base += be32_to_cpu(reg_offset);
|
||||
|
||||
n = getprop(devp, "reg-shift", ®_shift, sizeof(reg_shift));
|
||||
if (n != sizeof(reg_shift))
|
||||
reg_shift = 0;
|
||||
else
|
||||
reg_shift = be32_to_cpu(reg_shift);
|
||||
|
||||
scdp->open = ns16550_open;
|
||||
scdp->putc = ns16550_putc;
|
||||
|
||||
@@ -41,6 +41,8 @@
|
||||
# define SMPWMB eieio
|
||||
#endif
|
||||
|
||||
/* clang defines this macro for a builtin, which will not work with runtime patching */
|
||||
#undef __lwsync
|
||||
#define __lwsync() __asm__ __volatile__ (stringify_in_c(LWSYNC) : : :"memory")
|
||||
#define dma_rmb() __lwsync()
|
||||
#define dma_wmb() __asm__ __volatile__ (stringify_in_c(SMPWMB) : : :"memory")
|
||||
|
||||
@@ -83,6 +83,7 @@ struct ps3_dma_region_ops;
|
||||
* @bus_addr: The 'translated' bus address of the region.
|
||||
* @len: The length in bytes of the region.
|
||||
* @offset: The offset from the start of memory of the region.
|
||||
* @dma_mask: Device dma_mask.
|
||||
* @ioid: The IOID of the device who owns this region
|
||||
* @chunk_list: Opaque variable used by the ioc page manager.
|
||||
* @region_ops: struct ps3_dma_region_ops - dma region operations
|
||||
@@ -97,6 +98,7 @@ struct ps3_dma_region {
|
||||
enum ps3_dma_region_type region_type;
|
||||
unsigned long len;
|
||||
unsigned long offset;
|
||||
u64 dma_mask;
|
||||
|
||||
/* driver variables (set by ps3_dma_region_create) */
|
||||
unsigned long bus_addr;
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/memblock.h>
|
||||
@@ -1132,6 +1133,7 @@ int ps3_dma_region_init(struct ps3_system_bus_device *dev,
|
||||
enum ps3_dma_region_type region_type, void *addr, unsigned long len)
|
||||
{
|
||||
unsigned long lpar_addr;
|
||||
int result;
|
||||
|
||||
lpar_addr = addr ? ps3_mm_phys_to_lpar(__pa(addr)) : 0;
|
||||
|
||||
@@ -1143,6 +1145,16 @@ int ps3_dma_region_init(struct ps3_system_bus_device *dev,
|
||||
r->offset -= map.r1.offset;
|
||||
r->len = len ? len : _ALIGN_UP(map.total, 1 << r->page_size);
|
||||
|
||||
dev->core.dma_mask = &r->dma_mask;
|
||||
|
||||
result = dma_set_mask_and_coherent(&dev->core, DMA_BIT_MASK(32));
|
||||
|
||||
if (result < 0) {
|
||||
dev_err(&dev->core, "%s:%d: dma_set_mask_and_coherent failed: %d\n",
|
||||
__func__, __LINE__, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
switch (dev->dev_type) {
|
||||
case PS3_DEVICE_TYPE_SB:
|
||||
r->region_ops = (USE_DYNAMIC_DMA)
|
||||
|
||||
@@ -833,7 +833,7 @@ config CMM_IUCV
|
||||
config APPLDATA_BASE
|
||||
def_bool n
|
||||
prompt "Linux - VM Monitor Stream, base infrastructure"
|
||||
depends on PROC_FS
|
||||
depends on PROC_SYSCTL
|
||||
help
|
||||
This provides a kernel interface for creating and updating z/VM APPLDATA
|
||||
monitor records. The monitor records are updated at certain time
|
||||
|
||||
@@ -137,7 +137,7 @@ static void __init set_preferred_console(void)
|
||||
else if (CONSOLE_IS_3270)
|
||||
add_preferred_console("tty3270", 0, NULL);
|
||||
else if (CONSOLE_IS_VT220)
|
||||
add_preferred_console("ttyS", 1, NULL);
|
||||
add_preferred_console("ttysclp", 0, NULL);
|
||||
else if (CONSOLE_IS_HVC)
|
||||
add_preferred_console("hvc", 0, NULL);
|
||||
}
|
||||
|
||||
@@ -256,7 +256,8 @@ static int winch_tramp(int fd, struct tty_port *port, int *fd_out,
|
||||
goto out_close;
|
||||
}
|
||||
|
||||
if (os_set_fd_block(*fd_out, 0)) {
|
||||
err = os_set_fd_block(*fd_out, 0);
|
||||
if (err) {
|
||||
printk(UM_KERN_ERR "winch_tramp: failed to set thread_fd "
|
||||
"non-blocking.\n");
|
||||
goto out_close;
|
||||
|
||||
@@ -145,7 +145,8 @@ static int slip_open(void *data)
|
||||
}
|
||||
sfd = err;
|
||||
|
||||
if (set_up_tty(sfd))
|
||||
err = set_up_tty(sfd);
|
||||
if (err)
|
||||
goto out_close2;
|
||||
|
||||
pri->slave = sfd;
|
||||
|
||||
@@ -94,6 +94,7 @@ static inline void fpstate_init_fxstate(struct fxregs_state *fx)
|
||||
}
|
||||
extern void fpstate_sanitize_xstate(struct fpu *fpu);
|
||||
|
||||
/* Returns 0 or the negated trap number, which results in -EFAULT for #PF */
|
||||
#define user_insn(insn, output, input...) \
|
||||
({ \
|
||||
int err; \
|
||||
@@ -101,14 +102,14 @@ extern void fpstate_sanitize_xstate(struct fpu *fpu);
|
||||
might_fault(); \
|
||||
\
|
||||
asm volatile(ASM_STAC "\n" \
|
||||
"1:" #insn "\n\t" \
|
||||
"1: " #insn "\n" \
|
||||
"2: " ASM_CLAC "\n" \
|
||||
".section .fixup,\"ax\"\n" \
|
||||
"3: movl $-1,%[err]\n" \
|
||||
"3: negl %%eax\n" \
|
||||
" jmp 2b\n" \
|
||||
".previous\n" \
|
||||
_ASM_EXTABLE(1b, 3b) \
|
||||
: [err] "=r" (err), output \
|
||||
_ASM_EXTABLE_FAULT(1b, 3b) \
|
||||
: [err] "=a" (err), output \
|
||||
: "0"(0), input); \
|
||||
err; \
|
||||
})
|
||||
@@ -227,16 +228,20 @@ static inline void copy_fxregs_to_kernel(struct fpu *fpu)
|
||||
#define XRSTOR ".byte " REX_PREFIX "0x0f,0xae,0x2f"
|
||||
#define XRSTORS ".byte " REX_PREFIX "0x0f,0xc7,0x1f"
|
||||
|
||||
/*
|
||||
* After this @err contains 0 on success or the negated trap number when
|
||||
* the operation raises an exception. For faults this results in -EFAULT.
|
||||
*/
|
||||
#define XSTATE_OP(op, st, lmask, hmask, err) \
|
||||
asm volatile("1:" op "\n\t" \
|
||||
"xor %[err], %[err]\n" \
|
||||
"2:\n\t" \
|
||||
".pushsection .fixup,\"ax\"\n\t" \
|
||||
"3: movl $-2,%[err]\n\t" \
|
||||
"3: negl %%eax\n\t" \
|
||||
"jmp 2b\n\t" \
|
||||
".popsection\n\t" \
|
||||
_ASM_EXTABLE(1b, 3b) \
|
||||
: [err] "=r" (err) \
|
||||
_ASM_EXTABLE_FAULT(1b, 3b) \
|
||||
: [err] "=a" (err) \
|
||||
: "D" (st), "m" (*st), "a" (lmask), "d" (hmask) \
|
||||
: "memory")
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ int xstateregs_set(struct task_struct *target, const struct user_regset *regset,
|
||||
/*
|
||||
* A whole standard-format XSAVE buffer is needed:
|
||||
*/
|
||||
if ((pos != 0) || (count < fpu_user_xstate_size))
|
||||
if (pos != 0 || count != fpu_user_xstate_size)
|
||||
return -EFAULT;
|
||||
|
||||
xsave = &fpu->state.xsave;
|
||||
|
||||
@@ -633,8 +633,14 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
|
||||
unsigned virt_as = max((entry->eax >> 8) & 0xff, 48U);
|
||||
unsigned phys_as = entry->eax & 0xff;
|
||||
|
||||
if (!g_phys_as)
|
||||
/*
|
||||
* Use bare metal's MAXPHADDR if the CPU doesn't report guest
|
||||
* MAXPHYADDR separately, or if TDP (NPT) is disabled, as the
|
||||
* guest version "applies only to guests using nested paging".
|
||||
*/
|
||||
if (!g_phys_as || !tdp_enabled)
|
||||
g_phys_as = phys_as;
|
||||
|
||||
entry->eax = g_phys_as | (virt_as << 8);
|
||||
entry->edx = 0;
|
||||
/*
|
||||
|
||||
@@ -7044,6 +7044,8 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
|
||||
set_debugreg(vcpu->arch.eff_db[3], 3);
|
||||
set_debugreg(vcpu->arch.dr6, 6);
|
||||
vcpu->arch.switch_db_regs &= ~KVM_DEBUGREG_RELOAD;
|
||||
} else if (unlikely(hw_breakpoint_active())) {
|
||||
set_debugreg(0, 7);
|
||||
}
|
||||
|
||||
kvm_x86_ops->run(vcpu);
|
||||
|
||||
@@ -24,12 +24,24 @@
|
||||
|
||||
static const struct crypto_type crypto_shash_type;
|
||||
|
||||
int shash_no_setkey(struct crypto_shash *tfm, const u8 *key,
|
||||
unsigned int keylen)
|
||||
static int shash_no_setkey(struct crypto_shash *tfm, const u8 *key,
|
||||
unsigned int keylen)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(shash_no_setkey);
|
||||
|
||||
/*
|
||||
* Check whether an shash algorithm has a setkey function.
|
||||
*
|
||||
* For CFI compatibility, this must not be an inline function. This is because
|
||||
* when CFI is enabled, modules won't get the same address for shash_no_setkey
|
||||
* (if it were exported, which inlining would require) as the core kernel will.
|
||||
*/
|
||||
bool crypto_shash_alg_has_setkey(struct shash_alg *alg)
|
||||
{
|
||||
return alg->setkey != shash_no_setkey;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(crypto_shash_alg_has_setkey);
|
||||
|
||||
static int shash_setkey_unaligned(struct crypto_shash *tfm, const u8 *key,
|
||||
unsigned int keylen)
|
||||
|
||||
@@ -7,6 +7,11 @@ ccflags-$(CONFIG_ACPI_DEBUG) += -DACPI_DEBUG_OUTPUT
|
||||
#
|
||||
# ACPI Boot-Time Table Parsing
|
||||
#
|
||||
ifeq ($(CONFIG_ACPI_CUSTOM_DSDT),y)
|
||||
tables.o: $(src)/../../include/$(subst $\",,$(CONFIG_ACPI_CUSTOM_DSDT_FILE)) ;
|
||||
|
||||
endif
|
||||
|
||||
obj-$(CONFIG_ACPI) += tables.o
|
||||
obj-$(CONFIG_X86) += blacklist.o
|
||||
|
||||
|
||||
@@ -70,6 +70,7 @@ static int amba_handler_attach(struct acpi_device *adev,
|
||||
case IORESOURCE_MEM:
|
||||
if (!address_found) {
|
||||
dev->res = *rentry->res;
|
||||
dev->res.name = dev_name(&dev->dev);
|
||||
address_found = true;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1184,6 +1184,7 @@ static int __init acpi_init(void)
|
||||
init_acpi_device_notify();
|
||||
result = acpi_bus_init();
|
||||
if (result) {
|
||||
kobject_put(acpi_kobj);
|
||||
disable_acpi();
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -452,7 +452,7 @@ static ssize_t description_show(struct device *dev,
|
||||
(wchar_t *)acpi_dev->pnp.str_obj->buffer.pointer,
|
||||
acpi_dev->pnp.str_obj->buffer.length,
|
||||
UTF16_LITTLE_ENDIAN, buf,
|
||||
PAGE_SIZE);
|
||||
PAGE_SIZE - 1);
|
||||
|
||||
buf[result++] = '\n';
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <linux/acpi.h>
|
||||
#include <linux/dmi.h>
|
||||
#include <linux/sched.h> /* need_resched() */
|
||||
#include <linux/sort.h>
|
||||
#include <linux/tick.h>
|
||||
#include <linux/cpuidle.h>
|
||||
#include <linux/cpu.h>
|
||||
@@ -538,10 +539,37 @@ static void acpi_processor_power_verify_c3(struct acpi_processor *pr,
|
||||
return;
|
||||
}
|
||||
|
||||
static int acpi_cst_latency_cmp(const void *a, const void *b)
|
||||
{
|
||||
const struct acpi_processor_cx *x = a, *y = b;
|
||||
|
||||
if (!(x->valid && y->valid))
|
||||
return 0;
|
||||
if (x->latency > y->latency)
|
||||
return 1;
|
||||
if (x->latency < y->latency)
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
static void acpi_cst_latency_swap(void *a, void *b, int n)
|
||||
{
|
||||
struct acpi_processor_cx *x = a, *y = b;
|
||||
u32 tmp;
|
||||
|
||||
if (!(x->valid && y->valid))
|
||||
return;
|
||||
tmp = x->latency;
|
||||
x->latency = y->latency;
|
||||
y->latency = tmp;
|
||||
}
|
||||
|
||||
static int acpi_processor_power_verify(struct acpi_processor *pr)
|
||||
{
|
||||
unsigned int i;
|
||||
unsigned int working = 0;
|
||||
unsigned int last_latency = 0;
|
||||
unsigned int last_type = 0;
|
||||
bool buggy_latency = false;
|
||||
|
||||
pr->power.timer_broadcast_on_state = INT_MAX;
|
||||
|
||||
@@ -565,12 +593,24 @@ static int acpi_processor_power_verify(struct acpi_processor *pr)
|
||||
}
|
||||
if (!cx->valid)
|
||||
continue;
|
||||
if (cx->type >= last_type && cx->latency < last_latency)
|
||||
buggy_latency = true;
|
||||
last_latency = cx->latency;
|
||||
last_type = cx->type;
|
||||
|
||||
lapic_timer_check_state(i, pr, cx);
|
||||
tsc_check_state(cx->type);
|
||||
working++;
|
||||
}
|
||||
|
||||
if (buggy_latency) {
|
||||
pr_notice("FW issue: working around C-state latencies out of order\n");
|
||||
sort(&pr->power.states[1], max_cstate,
|
||||
sizeof(struct acpi_processor_cx),
|
||||
acpi_cst_latency_cmp,
|
||||
acpi_cst_latency_swap);
|
||||
}
|
||||
|
||||
lapic_timer_propagate_broadcast(pr);
|
||||
|
||||
return (working);
|
||||
|
||||
@@ -165,7 +165,7 @@ static void ahci_sunxi_start_engine(struct ata_port *ap)
|
||||
}
|
||||
|
||||
static const struct ata_port_info ahci_sunxi_port_info = {
|
||||
.flags = AHCI_FLAG_COMMON | ATA_FLAG_NCQ,
|
||||
.flags = AHCI_FLAG_COMMON | ATA_FLAG_NCQ | ATA_FLAG_NO_DIPM,
|
||||
.pio_mask = ATA_PIO4,
|
||||
.udma_mask = ATA_UDMA6,
|
||||
.port_ops = &ahci_platform_ops,
|
||||
|
||||
@@ -927,7 +927,7 @@ static int ep93xx_pata_probe(struct platform_device *pdev)
|
||||
/* INT[3] (IRQ_EP93XX_EXT3) line connected as pull down */
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq < 0) {
|
||||
err = -ENXIO;
|
||||
err = irq;
|
||||
goto err_rel_gpio;
|
||||
}
|
||||
|
||||
|
||||
@@ -908,10 +908,11 @@ static int octeon_cf_probe(struct platform_device *pdev)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
irq_handler = octeon_cf_interrupt;
|
||||
i = platform_get_irq(dma_dev, 0);
|
||||
if (i > 0)
|
||||
if (i > 0) {
|
||||
irq = i;
|
||||
irq_handler = octeon_cf_interrupt;
|
||||
}
|
||||
}
|
||||
of_node_put(dma_node);
|
||||
}
|
||||
|
||||
@@ -120,10 +120,12 @@ static int rb532_pata_driver_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq <= 0) {
|
||||
if (irq < 0) {
|
||||
dev_err(&pdev->dev, "no IRQ resource found\n");
|
||||
return -ENOENT;
|
||||
return irq;
|
||||
}
|
||||
if (!irq)
|
||||
return -EINVAL;
|
||||
|
||||
pdata = dev_get_platdata(&pdev->dev);
|
||||
if (!pdata) {
|
||||
|
||||
@@ -483,10 +483,12 @@ static int ahci_highbank_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq <= 0) {
|
||||
if (irq < 0) {
|
||||
dev_err(dev, "no irq\n");
|
||||
return -EINVAL;
|
||||
return irq;
|
||||
}
|
||||
if (!irq)
|
||||
return -EINVAL;
|
||||
|
||||
hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL);
|
||||
if (!hpriv) {
|
||||
|
||||
@@ -3301,7 +3301,7 @@ static void __exit ia_module_exit(void)
|
||||
{
|
||||
pci_unregister_driver(&ia_driver);
|
||||
|
||||
del_timer(&ia_timer);
|
||||
del_timer_sync(&ia_timer);
|
||||
}
|
||||
|
||||
module_init(ia_module_init);
|
||||
|
||||
@@ -298,7 +298,7 @@ static void __exit nicstar_cleanup(void)
|
||||
{
|
||||
XPRINTK("nicstar: nicstar_cleanup() called.\n");
|
||||
|
||||
del_timer(&ns_timer);
|
||||
del_timer_sync(&ns_timer);
|
||||
|
||||
pci_unregister_driver(&nicstar_driver);
|
||||
|
||||
@@ -526,6 +526,15 @@ static int ns_init_card(int i, struct pci_dev *pcidev)
|
||||
/* Set the VPI/VCI MSb mask to zero so we can receive OAM cells */
|
||||
writel(0x00000000, card->membase + VPM);
|
||||
|
||||
card->intcnt = 0;
|
||||
if (request_irq
|
||||
(pcidev->irq, &ns_irq_handler, IRQF_SHARED, "nicstar", card) != 0) {
|
||||
pr_err("nicstar%d: can't allocate IRQ %d.\n", i, pcidev->irq);
|
||||
error = 9;
|
||||
ns_init_card_error(card, error);
|
||||
return error;
|
||||
}
|
||||
|
||||
/* Initialize TSQ */
|
||||
card->tsq.org = dma_alloc_coherent(&card->pcidev->dev,
|
||||
NS_TSQSIZE + NS_TSQ_ALIGNMENT,
|
||||
@@ -752,15 +761,6 @@ static int ns_init_card(int i, struct pci_dev *pcidev)
|
||||
|
||||
card->efbie = 1;
|
||||
|
||||
card->intcnt = 0;
|
||||
if (request_irq
|
||||
(pcidev->irq, &ns_irq_handler, IRQF_SHARED, "nicstar", card) != 0) {
|
||||
printk("nicstar%d: can't allocate IRQ %d.\n", i, pcidev->irq);
|
||||
error = 9;
|
||||
ns_init_card_error(card, error);
|
||||
return error;
|
||||
}
|
||||
|
||||
/* Register device */
|
||||
card->atmdev = atm_dev_register("nicstar", &card->pcidev->dev, &atm_ops,
|
||||
-1, NULL);
|
||||
@@ -838,10 +838,12 @@ static void ns_init_card_error(ns_dev *card, int error)
|
||||
dev_kfree_skb_any(hb);
|
||||
}
|
||||
if (error >= 12) {
|
||||
kfree(card->rsq.org);
|
||||
dma_free_coherent(&card->pcidev->dev, NS_RSQSIZE + NS_RSQ_ALIGNMENT,
|
||||
card->rsq.org, card->rsq.dma);
|
||||
}
|
||||
if (error >= 11) {
|
||||
kfree(card->tsq.org);
|
||||
dma_free_coherent(&card->pcidev->dev, NS_TSQSIZE + NS_TSQ_ALIGNMENT,
|
||||
card->tsq.org, card->tsq.dma);
|
||||
}
|
||||
if (error >= 10) {
|
||||
free_irq(card->pcidev->irq, card);
|
||||
|
||||
@@ -800,6 +800,8 @@ static int virtblk_freeze(struct virtio_device *vdev)
|
||||
blk_mq_stop_hw_queues(vblk->disk->queue);
|
||||
|
||||
vdev->config->del_vqs(vdev);
|
||||
kfree(vblk->vqs);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -2508,6 +2508,11 @@ static int btusb_setup_qca_download_fw(struct hci_dev *hdev,
|
||||
sent += size;
|
||||
count -= size;
|
||||
|
||||
/* ep2 need time to switch from function acl to function dfu,
|
||||
* so we add 20ms delay here.
|
||||
*/
|
||||
msleep(20);
|
||||
|
||||
while (count) {
|
||||
size = min_t(size_t, count, QCA_DFU_PACKET_LEN);
|
||||
|
||||
|
||||
@@ -393,16 +393,18 @@ static int i_ipmi_set_timeout(struct ipmi_smi_msg *smi_msg,
|
||||
data[0] = 0;
|
||||
WDOG_SET_TIMER_USE(data[0], WDOG_TIMER_USE_SMS_OS);
|
||||
|
||||
if ((ipmi_version_major > 1)
|
||||
|| ((ipmi_version_major == 1) && (ipmi_version_minor >= 5))) {
|
||||
/* This is an IPMI 1.5-only feature. */
|
||||
data[0] |= WDOG_DONT_STOP_ON_SET;
|
||||
} else if (ipmi_watchdog_state != WDOG_TIMEOUT_NONE) {
|
||||
/*
|
||||
* In ipmi 1.0, setting the timer stops the watchdog, we
|
||||
* need to start it back up again.
|
||||
*/
|
||||
hbnow = 1;
|
||||
if (ipmi_watchdog_state != WDOG_TIMEOUT_NONE) {
|
||||
if ((ipmi_version_major > 1) ||
|
||||
((ipmi_version_major == 1) && (ipmi_version_minor >= 5))) {
|
||||
/* This is an IPMI 1.5-only feature. */
|
||||
data[0] |= WDOG_DONT_STOP_ON_SET;
|
||||
} else {
|
||||
/*
|
||||
* In ipmi 1.0, setting the timer stops the watchdog, we
|
||||
* need to start it back up again.
|
||||
*/
|
||||
hbnow = 1;
|
||||
}
|
||||
}
|
||||
|
||||
data[1] = 0;
|
||||
|
||||
@@ -544,6 +544,10 @@ static int set_protocol(struct cm4000_dev *dev, struct ptsreq *ptsreq)
|
||||
io_read_num_rec_bytes(iobase, &num_bytes_read);
|
||||
if (num_bytes_read >= 4) {
|
||||
DEBUGP(2, dev, "NumRecBytes = %i\n", num_bytes_read);
|
||||
if (num_bytes_read > 4) {
|
||||
rc = -EIO;
|
||||
goto exit_setprotocol;
|
||||
}
|
||||
break;
|
||||
}
|
||||
mdelay(10);
|
||||
|
||||
@@ -492,7 +492,7 @@ static struct port_buffer *get_inbuf(struct port *port)
|
||||
|
||||
buf = virtqueue_get_buf(port->in_vq, &len);
|
||||
if (buf) {
|
||||
buf->len = len;
|
||||
buf->len = min_t(size_t, len, buf->size);
|
||||
buf->offset = 0;
|
||||
port->stats.bytes_received += len;
|
||||
}
|
||||
@@ -1758,7 +1758,7 @@ static void control_work_handler(struct work_struct *work)
|
||||
while ((buf = virtqueue_get_buf(vq, &len))) {
|
||||
spin_unlock(&portdev->c_ivq_lock);
|
||||
|
||||
buf->len = len;
|
||||
buf->len = min_t(size_t, len, buf->size);
|
||||
buf->offset = 0;
|
||||
|
||||
handle_control_message(vq->vdev, portdev, buf);
|
||||
|
||||
@@ -1085,7 +1085,8 @@ static int clk_pllu_enable(struct clk_hw *hw)
|
||||
if (pll->lock)
|
||||
spin_lock_irqsave(pll->lock, flags);
|
||||
|
||||
_clk_pll_enable(hw);
|
||||
if (!clk_pll_is_enabled(hw))
|
||||
_clk_pll_enable(hw);
|
||||
|
||||
ret = clk_pll_wait_for_lock(pll);
|
||||
if (ret < 0)
|
||||
@@ -1702,7 +1703,8 @@ static int clk_pllu_tegra114_enable(struct clk_hw *hw)
|
||||
if (pll->lock)
|
||||
spin_lock_irqsave(pll->lock, flags);
|
||||
|
||||
_clk_pll_enable(hw);
|
||||
if (!clk_pll_is_enabled(hw))
|
||||
_clk_pll_enable(hw);
|
||||
|
||||
ret = clk_pll_wait_for_lock(pll);
|
||||
if (ret < 0)
|
||||
|
||||
@@ -334,7 +334,7 @@ static void free_buf_chain(struct device *dev, struct buffer_desc *buf,u32 phys)
|
||||
|
||||
buf1 = buf->next;
|
||||
phys1 = buf->phys_next;
|
||||
dma_unmap_single(dev, buf->phys_next, buf->buf_len, buf->dir);
|
||||
dma_unmap_single(dev, buf->phys_addr, buf->buf_len, buf->dir);
|
||||
dma_pool_free(buffer_pool, buf, phys);
|
||||
buf = buf1;
|
||||
phys = phys1;
|
||||
|
||||
@@ -553,13 +553,15 @@ static int nx842_OF_set_defaults(struct nx842_devdata *devdata)
|
||||
* The status field indicates if the device is enabled when the status
|
||||
* is 'okay'. Otherwise the device driver will be disabled.
|
||||
*
|
||||
* @prop - struct property point containing the maxsyncop for the update
|
||||
* @devdata: struct nx842_devdata to use for dev_info
|
||||
* @prop: struct property point containing the maxsyncop for the update
|
||||
*
|
||||
* Returns:
|
||||
* 0 - Device is available
|
||||
* -ENODEV - Device is not available
|
||||
*/
|
||||
static int nx842_OF_upd_status(struct property *prop)
|
||||
static int nx842_OF_upd_status(struct nx842_devdata *devdata,
|
||||
struct property *prop)
|
||||
{
|
||||
const char *status = (const char *)prop->value;
|
||||
|
||||
@@ -773,7 +775,7 @@ static int nx842_OF_upd(struct property *new_prop)
|
||||
goto out;
|
||||
|
||||
/* Perform property updates */
|
||||
ret = nx842_OF_upd_status(status);
|
||||
ret = nx842_OF_upd_status(new_devdata, status);
|
||||
if (ret)
|
||||
goto error_out;
|
||||
|
||||
@@ -1086,6 +1088,7 @@ static struct vio_device_id nx842_vio_driver_ids[] = {
|
||||
{"ibm,compression-v1", "ibm,compression"},
|
||||
{"", ""},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(vio, nx842_vio_driver_ids);
|
||||
|
||||
static struct vio_driver nx842_vio_driver = {
|
||||
.name = KBUILD_MODNAME,
|
||||
|
||||
@@ -1255,7 +1255,11 @@ static int qat_hal_put_rel_wr_xfer(struct icp_qat_fw_loader_handle *handle,
|
||||
pr_err("QAT: bad xfrAddr=0x%x\n", xfr_addr);
|
||||
return -EINVAL;
|
||||
}
|
||||
qat_hal_rd_rel_reg(handle, ae, ctx, ICP_GPB_REL, gprnum, &gprval);
|
||||
status = qat_hal_rd_rel_reg(handle, ae, ctx, ICP_GPB_REL, gprnum, &gprval);
|
||||
if (status) {
|
||||
pr_err("QAT: failed to read register");
|
||||
return status;
|
||||
}
|
||||
gpr_addr = qat_hal_get_reg_addr(ICP_GPB_REL, gprnum);
|
||||
data16low = 0xffff & data;
|
||||
data16hi = 0xffff & (data >> 0x10);
|
||||
|
||||
@@ -385,7 +385,6 @@ static int qat_uclo_init_umem_seg(struct icp_qat_fw_loader_handle *handle,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define ICP_DH895XCC_PESRAM_BAR_SIZE 0x80000
|
||||
static int qat_uclo_init_ae_memory(struct icp_qat_fw_loader_handle *handle,
|
||||
struct icp_qat_uof_initmem *init_mem)
|
||||
{
|
||||
|
||||
@@ -1006,6 +1006,7 @@ static int hash_hw_final(struct ahash_request *req)
|
||||
goto out;
|
||||
}
|
||||
} else if (req->nbytes == 0 && ctx->keylen > 0) {
|
||||
ret = -EPERM;
|
||||
dev_err(device_data->dev, "%s: Empty message with keylength > 0, NOT supported\n",
|
||||
__func__);
|
||||
goto out;
|
||||
|
||||
@@ -783,3 +783,4 @@ module_platform_driver(max8997_muic_driver);
|
||||
MODULE_DESCRIPTION("Maxim MAX8997 Extcon driver");
|
||||
MODULE_AUTHOR("Donggeun Kim <dg77.kim@samsung.com>");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_ALIAS("platform:max8997-muic");
|
||||
|
||||
@@ -92,7 +92,6 @@ static struct reg_data sm5502_reg_data[] = {
|
||||
| SM5502_REG_INTM2_MHL_MASK,
|
||||
.invert = true,
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
/* List of detectable cables */
|
||||
|
||||
@@ -192,15 +192,13 @@ static int fw_cfg_do_platform_probe(struct platform_device *pdev)
|
||||
/* fw_cfg revision attribute, in /sys/firmware/qemu_fw_cfg top-level dir. */
|
||||
static u32 fw_cfg_rev;
|
||||
|
||||
static ssize_t fw_cfg_showrev(struct kobject *k, struct attribute *a, char *buf)
|
||||
static ssize_t fw_cfg_showrev(struct kobject *k, struct kobj_attribute *a,
|
||||
char *buf)
|
||||
{
|
||||
return sprintf(buf, "%u\n", fw_cfg_rev);
|
||||
}
|
||||
|
||||
static const struct {
|
||||
struct attribute attr;
|
||||
ssize_t (*show)(struct kobject *k, struct attribute *a, char *buf);
|
||||
} fw_cfg_rev_attr = {
|
||||
static const struct kobj_attribute fw_cfg_rev_attr = {
|
||||
.attr = { .name = "rev", .mode = S_IRUSR },
|
||||
.show = fw_cfg_showrev,
|
||||
};
|
||||
|
||||
@@ -778,8 +778,11 @@ err_pm_dis:
|
||||
static int zynq_gpio_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct zynq_gpio *gpio = platform_get_drvdata(pdev);
|
||||
int ret;
|
||||
|
||||
pm_runtime_get_sync(&pdev->dev);
|
||||
ret = pm_runtime_get_sync(&pdev->dev);
|
||||
if (ret < 0)
|
||||
dev_warn(&pdev->dev, "pm_runtime_get_sync() Failed\n");
|
||||
gpiochip_remove(&gpio->chip);
|
||||
clk_disable_unprepare(gpio->clk);
|
||||
device_set_wakeup_capable(&pdev->dev, 0);
|
||||
|
||||
@@ -57,6 +57,8 @@ int qxl_mode_dumb_create(struct drm_file *file_priv,
|
||||
surf.height = args->height;
|
||||
surf.stride = pitch;
|
||||
surf.format = format;
|
||||
surf.data = 0;
|
||||
|
||||
r = qxl_gem_object_create_with_handle(qdev, file_priv,
|
||||
QXL_GEM_DOMAIN_VRAM,
|
||||
args->size, &surf, &qobj,
|
||||
|
||||
@@ -234,6 +234,7 @@ err_ttm:
|
||||
err_vbufs:
|
||||
vgdev->vdev->config->del_vqs(vgdev->vdev);
|
||||
err_vqs:
|
||||
dev->dev_private = NULL;
|
||||
kfree(vgdev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
* directory of this archive for more details.
|
||||
*/
|
||||
|
||||
#include <linux/acpi.h>
|
||||
#include <linux/hwmon.h>
|
||||
#include <linux/hwmon-sysfs.h>
|
||||
#include <linux/kernel.h>
|
||||
@@ -138,20 +137,12 @@ static const struct spi_device_id max31722_spi_id[] = {
|
||||
{"max31723", 0},
|
||||
{}
|
||||
};
|
||||
|
||||
static const struct acpi_device_id __maybe_unused max31722_acpi_id[] = {
|
||||
{"MAX31722", 0},
|
||||
{"MAX31723", 0},
|
||||
{}
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(spi, max31722_spi_id);
|
||||
|
||||
static struct spi_driver max31722_driver = {
|
||||
.driver = {
|
||||
.name = "max31722",
|
||||
.pm = &max31722_pm_ops,
|
||||
.acpi_match_table = ACPI_PTR(max31722_acpi_id),
|
||||
},
|
||||
.probe = max31722_probe,
|
||||
.remove = max31722_remove,
|
||||
|
||||
@@ -179,7 +179,7 @@ static int max31790_read_fan(struct device *dev, u32 attr, int channel,
|
||||
|
||||
switch (attr) {
|
||||
case hwmon_fan_input:
|
||||
sr = get_tach_period(data->fan_dynamics[channel]);
|
||||
sr = get_tach_period(data->fan_dynamics[channel % NR_CHANNEL]);
|
||||
rpm = RPM_FROM_REG(data->tach[channel], sr);
|
||||
*val = rpm;
|
||||
return 0;
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/idr.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/irqflags.h>
|
||||
#include <linux/jump_label.h>
|
||||
#include <linux/kernel.h>
|
||||
@@ -1003,6 +1004,8 @@ static void i2c_device_shutdown(struct device *dev)
|
||||
driver = to_i2c_driver(dev->driver);
|
||||
if (driver->shutdown)
|
||||
driver->shutdown(client);
|
||||
else if (client->irq > 0)
|
||||
disable_irq(client->irq);
|
||||
}
|
||||
|
||||
static void i2c_client_dev_release(struct device *dev)
|
||||
|
||||
@@ -120,7 +120,11 @@ struct bma180_data {
|
||||
int scale;
|
||||
int bw;
|
||||
bool pmode;
|
||||
u8 buff[16]; /* 3x 16-bit + 8-bit + padding + timestamp */
|
||||
/* Ensure timestamp is naturally aligned */
|
||||
struct {
|
||||
s16 chan[4];
|
||||
s64 timestamp __aligned(8);
|
||||
} scan;
|
||||
};
|
||||
|
||||
enum bma180_chan {
|
||||
@@ -667,12 +671,12 @@ static irqreturn_t bma180_trigger_handler(int irq, void *p)
|
||||
mutex_unlock(&data->mutex);
|
||||
goto err;
|
||||
}
|
||||
((s16 *)data->buff)[i++] = ret;
|
||||
data->scan.chan[i++] = ret;
|
||||
}
|
||||
|
||||
mutex_unlock(&data->mutex);
|
||||
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, data->buff, time_ns);
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, &data->scan, time_ns);
|
||||
err:
|
||||
iio_trigger_notify_done(indio_dev->trig);
|
||||
|
||||
|
||||
@@ -76,7 +76,11 @@ static const int bma220_scale_table[][4] = {
|
||||
struct bma220_data {
|
||||
struct spi_device *spi_device;
|
||||
struct mutex lock;
|
||||
s8 buffer[16]; /* 3x8-bit channels + 5x8 padding + 8x8 timestamp */
|
||||
struct {
|
||||
s8 chans[3];
|
||||
/* Ensure timestamp is naturally aligned. */
|
||||
s64 timestamp __aligned(8);
|
||||
} scan;
|
||||
u8 tx_buf[2] ____cacheline_aligned;
|
||||
};
|
||||
|
||||
@@ -107,12 +111,12 @@ static irqreturn_t bma220_trigger_handler(int irq, void *p)
|
||||
|
||||
mutex_lock(&data->lock);
|
||||
data->tx_buf[0] = BMA220_REG_ACCEL_X | BMA220_READ_MASK;
|
||||
ret = spi_write_then_read(spi, data->tx_buf, 1, data->buffer,
|
||||
ret = spi_write_then_read(spi, data->tx_buf, 1, &data->scan.chans,
|
||||
ARRAY_SIZE(bma220_channels) - 1);
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, data->buffer,
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, &data->scan,
|
||||
pf->timestamp);
|
||||
err:
|
||||
mutex_unlock(&data->lock);
|
||||
|
||||
@@ -96,12 +96,23 @@ enum kx_acpi_type {
|
||||
ACPI_SMO8500,
|
||||
};
|
||||
|
||||
enum kxcjk1013_axis {
|
||||
AXIS_X,
|
||||
AXIS_Y,
|
||||
AXIS_Z,
|
||||
AXIS_MAX
|
||||
};
|
||||
|
||||
struct kxcjk1013_data {
|
||||
struct i2c_client *client;
|
||||
struct iio_trigger *dready_trig;
|
||||
struct iio_trigger *motion_trig;
|
||||
struct mutex mutex;
|
||||
s16 buffer[8];
|
||||
/* Ensure timestamp naturally aligned */
|
||||
struct {
|
||||
s16 chans[AXIS_MAX];
|
||||
s64 timestamp __aligned(8);
|
||||
} scan;
|
||||
u8 odr_bits;
|
||||
u8 range;
|
||||
int wake_thres;
|
||||
@@ -115,13 +126,6 @@ struct kxcjk1013_data {
|
||||
enum kx_acpi_type acpi_type;
|
||||
};
|
||||
|
||||
enum kxcjk1013_axis {
|
||||
AXIS_X,
|
||||
AXIS_Y,
|
||||
AXIS_Z,
|
||||
AXIS_MAX,
|
||||
};
|
||||
|
||||
enum kxcjk1013_mode {
|
||||
STANDBY,
|
||||
OPERATION,
|
||||
@@ -971,12 +975,12 @@ static irqreturn_t kxcjk1013_trigger_handler(int irq, void *p)
|
||||
ret = i2c_smbus_read_i2c_block_data_or_emulated(data->client,
|
||||
KXCJK1013_REG_XOUT_L,
|
||||
AXIS_MAX * 2,
|
||||
(u8 *)data->buffer);
|
||||
(u8 *)data->scan.chans);
|
||||
mutex_unlock(&data->mutex);
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, data->buffer,
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, &data->scan,
|
||||
data->timestamp);
|
||||
err:
|
||||
iio_trigger_notify_done(indio_dev->trig);
|
||||
|
||||
@@ -106,7 +106,11 @@ struct stk8312_data {
|
||||
u8 mode;
|
||||
struct iio_trigger *dready_trig;
|
||||
bool dready_trigger_on;
|
||||
s8 buffer[16]; /* 3x8-bit channels + 5x8 padding + 64-bit timestamp */
|
||||
/* Ensure timestamp is naturally aligned */
|
||||
struct {
|
||||
s8 chans[3];
|
||||
s64 timestamp __aligned(8);
|
||||
} scan;
|
||||
};
|
||||
|
||||
static IIO_CONST_ATTR(in_accel_scale_available, STK8312_SCALE_AVAIL);
|
||||
@@ -443,7 +447,7 @@ static irqreturn_t stk8312_trigger_handler(int irq, void *p)
|
||||
ret = i2c_smbus_read_i2c_block_data(data->client,
|
||||
STK8312_REG_XOUT,
|
||||
STK8312_ALL_CHANNEL_SIZE,
|
||||
data->buffer);
|
||||
data->scan.chans);
|
||||
if (ret < STK8312_ALL_CHANNEL_SIZE) {
|
||||
dev_err(&data->client->dev, "register read failed\n");
|
||||
mutex_unlock(&data->lock);
|
||||
@@ -457,12 +461,12 @@ static irqreturn_t stk8312_trigger_handler(int irq, void *p)
|
||||
mutex_unlock(&data->lock);
|
||||
goto err;
|
||||
}
|
||||
data->buffer[i++] = ret;
|
||||
data->scan.chans[i++] = ret;
|
||||
}
|
||||
}
|
||||
mutex_unlock(&data->lock);
|
||||
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, data->buffer,
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, &data->scan,
|
||||
pf->timestamp);
|
||||
err:
|
||||
iio_trigger_notify_done(indio_dev->trig);
|
||||
|
||||
@@ -94,12 +94,11 @@ struct stk8ba50_data {
|
||||
u8 sample_rate_idx;
|
||||
struct iio_trigger *dready_trig;
|
||||
bool dready_trigger_on;
|
||||
/*
|
||||
* 3 x 16-bit channels (10-bit data, 6-bit padding) +
|
||||
* 1 x 16 padding +
|
||||
* 4 x 16 64-bit timestamp
|
||||
*/
|
||||
s16 buffer[8];
|
||||
/* Ensure timestamp is naturally aligned */
|
||||
struct {
|
||||
s16 chans[3];
|
||||
s64 timetamp __aligned(8);
|
||||
} scan;
|
||||
};
|
||||
|
||||
#define STK8BA50_ACCEL_CHANNEL(index, reg, axis) { \
|
||||
@@ -329,7 +328,7 @@ static irqreturn_t stk8ba50_trigger_handler(int irq, void *p)
|
||||
ret = i2c_smbus_read_i2c_block_data(data->client,
|
||||
STK8BA50_REG_XOUT,
|
||||
STK8BA50_ALL_CHANNEL_SIZE,
|
||||
(u8 *)data->buffer);
|
||||
(u8 *)data->scan.chans);
|
||||
if (ret < STK8BA50_ALL_CHANNEL_SIZE) {
|
||||
dev_err(&data->client->dev, "register read failed\n");
|
||||
goto err;
|
||||
@@ -342,10 +341,10 @@ static irqreturn_t stk8ba50_trigger_handler(int irq, void *p)
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
|
||||
data->buffer[i++] = ret;
|
||||
data->scan.chans[i++] = ret;
|
||||
}
|
||||
}
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, data->buffer,
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, &data->scan,
|
||||
pf->timestamp);
|
||||
err:
|
||||
mutex_unlock(&data->lock);
|
||||
|
||||
@@ -292,10 +292,14 @@ static irqreturn_t ads1015_trigger_handler(int irq, void *p)
|
||||
struct iio_poll_func *pf = p;
|
||||
struct iio_dev *indio_dev = pf->indio_dev;
|
||||
struct ads1015_data *data = iio_priv(indio_dev);
|
||||
s16 buf[8]; /* 1x s16 ADC val + 3x s16 padding + 4x s16 timestamp */
|
||||
/* Ensure natural alignment of timestamp */
|
||||
struct {
|
||||
s16 chan;
|
||||
s64 timestamp __aligned(8);
|
||||
} scan;
|
||||
int chan, ret, res;
|
||||
|
||||
memset(buf, 0, sizeof(buf));
|
||||
memset(&scan, 0, sizeof(scan));
|
||||
|
||||
mutex_lock(&data->lock);
|
||||
chan = find_first_bit(indio_dev->active_scan_mask,
|
||||
@@ -306,10 +310,10 @@ static irqreturn_t ads1015_trigger_handler(int irq, void *p)
|
||||
goto err;
|
||||
}
|
||||
|
||||
buf[0] = res;
|
||||
scan.chan = res;
|
||||
mutex_unlock(&data->lock);
|
||||
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, buf,
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, &scan,
|
||||
iio_get_time_ns(indio_dev));
|
||||
|
||||
err:
|
||||
|
||||
@@ -180,7 +180,11 @@ struct vf610_adc {
|
||||
u32 sample_freq_avail[5];
|
||||
|
||||
struct completion completion;
|
||||
u16 buffer[8];
|
||||
/* Ensure the timestamp is naturally aligned */
|
||||
struct {
|
||||
u16 chan;
|
||||
s64 timestamp __aligned(8);
|
||||
} scan;
|
||||
};
|
||||
|
||||
static const u32 vf610_hw_avgs[] = { 1, 4, 8, 16, 32 };
|
||||
@@ -592,9 +596,9 @@ static irqreturn_t vf610_adc_isr(int irq, void *dev_id)
|
||||
if (coco & VF610_ADC_HS_COCO0) {
|
||||
info->value = vf610_adc_read_data(info);
|
||||
if (iio_buffer_enabled(indio_dev)) {
|
||||
info->buffer[0] = info->value;
|
||||
info->scan.chan = info->value;
|
||||
iio_push_to_buffers_with_timestamp(indio_dev,
|
||||
info->buffer,
|
||||
&info->scan,
|
||||
iio_get_time_ns(indio_dev));
|
||||
iio_trigger_notify_done(indio_dev->trig);
|
||||
} else
|
||||
|
||||
@@ -104,7 +104,11 @@ struct bmg160_data {
|
||||
struct iio_trigger *dready_trig;
|
||||
struct iio_trigger *motion_trig;
|
||||
struct mutex mutex;
|
||||
s16 buffer[8];
|
||||
/* Ensure naturally aligned timestamp */
|
||||
struct {
|
||||
s16 chans[3];
|
||||
s64 timestamp __aligned(8);
|
||||
} scan;
|
||||
u32 dps_range;
|
||||
int ev_enable_state;
|
||||
int slope_thres;
|
||||
@@ -874,12 +878,12 @@ static irqreturn_t bmg160_trigger_handler(int irq, void *p)
|
||||
|
||||
mutex_lock(&data->mutex);
|
||||
ret = regmap_bulk_read(data->regmap, BMG160_REG_XOUT_L,
|
||||
data->buffer, AXIS_MAX * 2);
|
||||
data->scan.chans, AXIS_MAX * 2);
|
||||
mutex_unlock(&data->mutex);
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, data->buffer,
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, &data->scan,
|
||||
pf->timestamp);
|
||||
err:
|
||||
iio_trigger_notify_done(indio_dev->trig);
|
||||
|
||||
@@ -36,7 +36,11 @@
|
||||
struct am2315_data {
|
||||
struct i2c_client *client;
|
||||
struct mutex lock;
|
||||
s16 buffer[8]; /* 2x16-bit channels + 2x16 padding + 4x16 timestamp */
|
||||
/* Ensure timestamp is naturally aligned */
|
||||
struct {
|
||||
s16 chans[2];
|
||||
s64 timestamp __aligned(8);
|
||||
} scan;
|
||||
};
|
||||
|
||||
struct am2315_sensor_data {
|
||||
@@ -170,20 +174,20 @@ static irqreturn_t am2315_trigger_handler(int irq, void *p)
|
||||
|
||||
mutex_lock(&data->lock);
|
||||
if (*(indio_dev->active_scan_mask) == AM2315_ALL_CHANNEL_MASK) {
|
||||
data->buffer[0] = sensor_data.hum_data;
|
||||
data->buffer[1] = sensor_data.temp_data;
|
||||
data->scan.chans[0] = sensor_data.hum_data;
|
||||
data->scan.chans[1] = sensor_data.temp_data;
|
||||
} else {
|
||||
i = 0;
|
||||
for_each_set_bit(bit, indio_dev->active_scan_mask,
|
||||
indio_dev->masklength) {
|
||||
data->buffer[i] = (bit ? sensor_data.temp_data :
|
||||
sensor_data.hum_data);
|
||||
data->scan.chans[i] = (bit ? sensor_data.temp_data :
|
||||
sensor_data.hum_data);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
mutex_unlock(&data->lock);
|
||||
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, data->buffer,
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, &data->scan,
|
||||
pf->timestamp);
|
||||
err:
|
||||
iio_trigger_notify_done(indio_dev->trig);
|
||||
|
||||
@@ -83,9 +83,6 @@ static irqreturn_t adis_trigger_handler(int irq, void *p)
|
||||
struct adis *adis = iio_device_get_drvdata(indio_dev);
|
||||
int ret;
|
||||
|
||||
if (!adis->buffer)
|
||||
return -ENOMEM;
|
||||
|
||||
if (adis->data->has_paging) {
|
||||
mutex_lock(&adis->txrx_lock);
|
||||
if (adis->current_page != 0) {
|
||||
|
||||
@@ -54,7 +54,11 @@
|
||||
struct isl29125_data {
|
||||
struct i2c_client *client;
|
||||
u8 conf1;
|
||||
u16 buffer[8]; /* 3x 16-bit, padding, 8 bytes timestamp */
|
||||
/* Ensure timestamp is naturally aligned */
|
||||
struct {
|
||||
u16 chans[3];
|
||||
s64 timestamp __aligned(8);
|
||||
} scan;
|
||||
};
|
||||
|
||||
#define ISL29125_CHANNEL(_color, _si) { \
|
||||
@@ -187,10 +191,10 @@ static irqreturn_t isl29125_trigger_handler(int irq, void *p)
|
||||
if (ret < 0)
|
||||
goto done;
|
||||
|
||||
data->buffer[j++] = ret;
|
||||
data->scan.chans[j++] = ret;
|
||||
}
|
||||
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, data->buffer,
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, &data->scan,
|
||||
iio_get_time_ns(indio_dev));
|
||||
|
||||
done:
|
||||
|
||||
@@ -35,9 +35,12 @@
|
||||
#define LTR501_PART_ID 0x86
|
||||
#define LTR501_MANUFAC_ID 0x87
|
||||
#define LTR501_ALS_DATA1 0x88 /* 16-bit, little endian */
|
||||
#define LTR501_ALS_DATA1_UPPER 0x89 /* upper 8 bits of LTR501_ALS_DATA1 */
|
||||
#define LTR501_ALS_DATA0 0x8a /* 16-bit, little endian */
|
||||
#define LTR501_ALS_DATA0_UPPER 0x8b /* upper 8 bits of LTR501_ALS_DATA0 */
|
||||
#define LTR501_ALS_PS_STATUS 0x8c
|
||||
#define LTR501_PS_DATA 0x8d /* 16-bit, little endian */
|
||||
#define LTR501_PS_DATA_UPPER 0x8e /* upper 8 bits of LTR501_PS_DATA */
|
||||
#define LTR501_INTR 0x8f /* output mode, polarity, mode */
|
||||
#define LTR501_PS_THRESH_UP 0x90 /* 11 bit, ps upper threshold */
|
||||
#define LTR501_PS_THRESH_LOW 0x92 /* 11 bit, ps lower threshold */
|
||||
@@ -408,18 +411,19 @@ static int ltr501_read_als(struct ltr501_data *data, __le16 buf[2])
|
||||
|
||||
static int ltr501_read_ps(struct ltr501_data *data)
|
||||
{
|
||||
int ret, status;
|
||||
__le16 status;
|
||||
int ret;
|
||||
|
||||
ret = ltr501_drdy(data, LTR501_STATUS_PS_RDY);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
ret = regmap_bulk_read(data->regmap, LTR501_PS_DATA,
|
||||
&status, 2);
|
||||
&status, sizeof(status));
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
return status;
|
||||
return le16_to_cpu(status);
|
||||
}
|
||||
|
||||
static int ltr501_read_intr_prst(struct ltr501_data *data,
|
||||
@@ -1180,7 +1184,7 @@ static struct ltr501_chip_info ltr501_chip_info_tbl[] = {
|
||||
.als_gain_tbl_size = ARRAY_SIZE(ltr559_als_gain_tbl),
|
||||
.ps_gain = ltr559_ps_gain_tbl,
|
||||
.ps_gain_tbl_size = ARRAY_SIZE(ltr559_ps_gain_tbl),
|
||||
.als_mode_active = BIT(1),
|
||||
.als_mode_active = BIT(0),
|
||||
.als_gain_mask = BIT(2) | BIT(3) | BIT(4),
|
||||
.als_gain_shift = 2,
|
||||
.info = <r501_info,
|
||||
@@ -1329,9 +1333,12 @@ static bool ltr501_is_volatile_reg(struct device *dev, unsigned int reg)
|
||||
{
|
||||
switch (reg) {
|
||||
case LTR501_ALS_DATA1:
|
||||
case LTR501_ALS_DATA1_UPPER:
|
||||
case LTR501_ALS_DATA0:
|
||||
case LTR501_ALS_DATA0_UPPER:
|
||||
case LTR501_ALS_PS_STATUS:
|
||||
case LTR501_PS_DATA:
|
||||
case LTR501_PS_DATA_UPPER:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
||||
@@ -56,7 +56,11 @@ struct tcs3414_data {
|
||||
u8 control;
|
||||
u8 gain;
|
||||
u8 timing;
|
||||
u16 buffer[8]; /* 4x 16-bit + 8 bytes timestamp */
|
||||
/* Ensure timestamp is naturally aligned */
|
||||
struct {
|
||||
u16 chans[4];
|
||||
s64 timestamp __aligned(8);
|
||||
} scan;
|
||||
};
|
||||
|
||||
#define TCS3414_CHANNEL(_color, _si, _addr) { \
|
||||
@@ -212,10 +216,10 @@ static irqreturn_t tcs3414_trigger_handler(int irq, void *p)
|
||||
if (ret < 0)
|
||||
goto done;
|
||||
|
||||
data->buffer[j++] = ret;
|
||||
data->scan.chans[j++] = ret;
|
||||
}
|
||||
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, data->buffer,
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, &data->scan,
|
||||
iio_get_time_ns(indio_dev));
|
||||
|
||||
done:
|
||||
|
||||
@@ -51,7 +51,11 @@ struct lidar_data {
|
||||
int (*xfer)(struct lidar_data *data, u8 reg, u8 *val, int len);
|
||||
int i2c_enabled;
|
||||
|
||||
u16 buffer[8]; /* 2 byte distance + 8 byte timestamp */
|
||||
/* Ensure timestamp is naturally aligned */
|
||||
struct {
|
||||
u16 chan;
|
||||
s64 timestamp __aligned(8);
|
||||
} scan;
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec lidar_channels[] = {
|
||||
@@ -236,9 +240,9 @@ static irqreturn_t lidar_trigger_handler(int irq, void *private)
|
||||
struct lidar_data *data = iio_priv(indio_dev);
|
||||
int ret;
|
||||
|
||||
ret = lidar_get_measurement(data, data->buffer);
|
||||
ret = lidar_get_measurement(data, &data->scan.chan);
|
||||
if (!ret) {
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, data->buffer,
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, &data->scan,
|
||||
iio_get_time_ns(indio_dev));
|
||||
} else if (ret != -EINVAL) {
|
||||
dev_err(&data->client->dev, "cannot read LIDAR measurement");
|
||||
|
||||
@@ -2370,7 +2370,8 @@ static int cma_resolve_ib_route(struct rdma_id_private *id_priv, int timeout_ms)
|
||||
work->new_state = RDMA_CM_ROUTE_RESOLVED;
|
||||
work->event.event = RDMA_CM_EVENT_ROUTE_RESOLVED;
|
||||
|
||||
route->path_rec = kmalloc(sizeof *route->path_rec, GFP_KERNEL);
|
||||
if (!route->path_rec)
|
||||
route->path_rec = kmalloc(sizeof *route->path_rec, GFP_KERNEL);
|
||||
if (!route->path_rec) {
|
||||
ret = -ENOMEM;
|
||||
goto err1;
|
||||
|
||||
@@ -277,6 +277,7 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4_wq *wq,
|
||||
if (user && (!wq->sq.bar2_pa || !wq->rq.bar2_pa)) {
|
||||
pr_warn(MOD "%s: sqid %u or rqid %u not in BAR2 range.\n",
|
||||
pci_name(rdev->lldi.pdev), wq->sq.qid, wq->rq.qid);
|
||||
ret = -EINVAL;
|
||||
goto free_dma;
|
||||
}
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@ int rxe_mem_init_user(struct rxe_dev *rxe, struct rxe_pd *pd, u64 start,
|
||||
if (IS_ERR(umem)) {
|
||||
pr_warn("err %d from rxe_umem_get\n",
|
||||
(int)PTR_ERR(umem));
|
||||
err = -EINVAL;
|
||||
err = PTR_ERR(umem);
|
||||
goto err1;
|
||||
}
|
||||
|
||||
|
||||
@@ -259,10 +259,8 @@ static struct socket *rxe_setup_udp_tunnel(struct net *net, __be16 port,
|
||||
|
||||
/* Create UDP socket */
|
||||
err = udp_sock_create(net, &udp_cfg, &sock);
|
||||
if (err < 0) {
|
||||
pr_err("failed to create udp socket. err = %d\n", err);
|
||||
if (err < 0)
|
||||
return ERR_PTR(err);
|
||||
}
|
||||
|
||||
tnl_cfg.encap_type = 1;
|
||||
tnl_cfg.encap_rcv = rxe_udp_encap_recv;
|
||||
@@ -665,6 +663,12 @@ int rxe_net_ipv6_init(void)
|
||||
|
||||
recv_sockets.sk6 = rxe_setup_udp_tunnel(&init_net,
|
||||
htons(ROCE_V2_UDP_DPORT), true);
|
||||
if (PTR_ERR(recv_sockets.sk6) == -EAFNOSUPPORT) {
|
||||
recv_sockets.sk6 = NULL;
|
||||
pr_warn("IPv6 is not supported, can not create a UDPv6 socket\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (IS_ERR(recv_sockets.sk6)) {
|
||||
recv_sockets.sk6 = NULL;
|
||||
pr_err("Failed to create IPv6 UDP tunnel\n");
|
||||
|
||||
@@ -492,7 +492,7 @@ static int joydev_handle_JSIOCSBTNMAP(struct joydev *joydev,
|
||||
memcpy(joydev->keypam, keypam, len);
|
||||
|
||||
for (i = 0; i < joydev->nkey; i++)
|
||||
joydev->keymap[keypam[i] - BTN_MISC] = i;
|
||||
joydev->keymap[joydev->keypam[i] - BTN_MISC] = i;
|
||||
|
||||
out:
|
||||
kfree(keypam);
|
||||
|
||||
@@ -512,6 +512,7 @@ static int hil_dev_connect(struct serio *serio, struct serio_driver *drv)
|
||||
HIL_IDD_NUM_AXES_PER_SET(*idd)) {
|
||||
printk(KERN_INFO PREFIX
|
||||
"combo devices are not supported.\n");
|
||||
error = -EINVAL;
|
||||
goto bail1;
|
||||
}
|
||||
|
||||
|
||||
@@ -266,7 +266,7 @@ static int e2i_init(struct usbtouch_usb *usbtouch)
|
||||
int ret;
|
||||
struct usb_device *udev = interface_to_usbdev(usbtouch->interface);
|
||||
|
||||
ret = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
|
||||
ret = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
|
||||
0x01, 0x02, 0x0000, 0x0081,
|
||||
NULL, 0, USB_CTRL_SET_TIMEOUT);
|
||||
|
||||
@@ -462,7 +462,7 @@ static int mtouch_init(struct usbtouch_usb *usbtouch)
|
||||
int ret, i;
|
||||
struct usb_device *udev = interface_to_usbdev(usbtouch->interface);
|
||||
|
||||
ret = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
|
||||
ret = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
|
||||
MTOUCHUSB_RESET,
|
||||
USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
|
||||
1, 0, NULL, 0, USB_CTRL_SET_TIMEOUT);
|
||||
@@ -474,7 +474,7 @@ static int mtouch_init(struct usbtouch_usb *usbtouch)
|
||||
msleep(150);
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
ret = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
|
||||
ret = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
|
||||
MTOUCHUSB_ASYNC_REPORT,
|
||||
USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
|
||||
1, 1, NULL, 0, USB_CTRL_SET_TIMEOUT);
|
||||
@@ -645,7 +645,7 @@ static int dmc_tsc10_init(struct usbtouch_usb *usbtouch)
|
||||
}
|
||||
|
||||
/* start sending data */
|
||||
ret = usb_control_msg(dev, usb_rcvctrlpipe (dev, 0),
|
||||
ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
|
||||
TSC10_CMD_DATA1,
|
||||
USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
|
||||
0, 0, NULL, 0, USB_CTRL_SET_TIMEOUT);
|
||||
|
||||
@@ -591,8 +591,11 @@ static int tpci200_pci_probe(struct pci_dev *pdev,
|
||||
|
||||
out_err_bus_register:
|
||||
tpci200_uninstall(tpci200);
|
||||
/* tpci200->info->cfg_regs is unmapped in tpci200_uninstall */
|
||||
tpci200->info->cfg_regs = NULL;
|
||||
out_err_install:
|
||||
iounmap(tpci200->info->cfg_regs);
|
||||
if (tpci200->info->cfg_regs)
|
||||
iounmap(tpci200->info->cfg_regs);
|
||||
out_err_ioremap:
|
||||
pci_release_region(pdev, TPCI200_CFG_MEM_BAR);
|
||||
out_err_pci_request:
|
||||
|
||||
@@ -2352,7 +2352,7 @@ static void __exit
|
||||
HFC_cleanup(void)
|
||||
{
|
||||
if (timer_pending(&hfc_tl))
|
||||
del_timer(&hfc_tl);
|
||||
del_timer_sync(&hfc_tl);
|
||||
|
||||
pci_unregister_driver(&hfc_driver);
|
||||
}
|
||||
|
||||
@@ -259,6 +259,17 @@ static void ktd2692_setup(struct ktd2692_context *led)
|
||||
| KTD2692_REG_FLASH_CURRENT_BASE);
|
||||
}
|
||||
|
||||
static void regulator_disable_action(void *_data)
|
||||
{
|
||||
struct device *dev = _data;
|
||||
struct ktd2692_context *led = dev_get_drvdata(dev);
|
||||
int ret;
|
||||
|
||||
ret = regulator_disable(led->regulator);
|
||||
if (ret)
|
||||
dev_err(dev, "Failed to disable supply: %d\n", ret);
|
||||
}
|
||||
|
||||
static int ktd2692_parse_dt(struct ktd2692_context *led, struct device *dev,
|
||||
struct ktd2692_led_config_data *cfg)
|
||||
{
|
||||
@@ -289,8 +300,14 @@ static int ktd2692_parse_dt(struct ktd2692_context *led, struct device *dev,
|
||||
|
||||
if (led->regulator) {
|
||||
ret = regulator_enable(led->regulator);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
dev_err(dev, "Failed to enable supply: %d\n", ret);
|
||||
} else {
|
||||
ret = devm_add_action_or_reset(dev,
|
||||
regulator_disable_action, dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
child_node = of_get_next_available_child(np, NULL);
|
||||
@@ -380,17 +397,9 @@ static int ktd2692_probe(struct platform_device *pdev)
|
||||
static int ktd2692_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct ktd2692_context *led = platform_get_drvdata(pdev);
|
||||
int ret;
|
||||
|
||||
led_classdev_flash_unregister(&led->fled_cdev);
|
||||
|
||||
if (led->regulator) {
|
||||
ret = regulator_disable(led->regulator);
|
||||
if (ret)
|
||||
dev_err(&pdev->dev,
|
||||
"Failed to disable supply: %d\n", ret);
|
||||
}
|
||||
|
||||
mutex_destroy(&led->lock);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -549,7 +549,8 @@ int dm_btree_remove(struct dm_btree_info *info, dm_block_t root,
|
||||
delete_at(n, index);
|
||||
}
|
||||
|
||||
*new_root = shadow_root(&spine);
|
||||
if (!r)
|
||||
*new_root = shadow_root(&spine);
|
||||
exit_shadow_spine(&spine);
|
||||
|
||||
return r;
|
||||
|
||||
@@ -171,6 +171,14 @@ static int sm_disk_new_block(struct dm_space_map *sm, dm_block_t *b)
|
||||
* Any block we allocate has to be free in both the old and current ll.
|
||||
*/
|
||||
r = sm_ll_find_common_free_block(&smd->old_ll, &smd->ll, smd->begin, smd->ll.nr_blocks, b);
|
||||
if (r == -ENOSPC) {
|
||||
/*
|
||||
* There's no free block between smd->begin and the end of the metadata device.
|
||||
* We search before smd->begin in case something has been freed.
|
||||
*/
|
||||
r = sm_ll_find_common_free_block(&smd->old_ll, &smd->ll, 0, smd->begin, b);
|
||||
}
|
||||
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
@@ -199,7 +207,6 @@ static int sm_disk_commit(struct dm_space_map *sm)
|
||||
return r;
|
||||
|
||||
memcpy(&smd->old_ll, &smd->ll, sizeof(smd->old_ll));
|
||||
smd->begin = 0;
|
||||
smd->nr_allocated_this_transaction = 0;
|
||||
|
||||
r = sm_disk_get_nr_free(sm, &nr_free);
|
||||
|
||||
@@ -451,6 +451,14 @@ static int sm_metadata_new_block_(struct dm_space_map *sm, dm_block_t *b)
|
||||
* Any block we allocate has to be free in both the old and current ll.
|
||||
*/
|
||||
r = sm_ll_find_common_free_block(&smm->old_ll, &smm->ll, smm->begin, smm->ll.nr_blocks, b);
|
||||
if (r == -ENOSPC) {
|
||||
/*
|
||||
* There's no free block between smm->begin and the end of the metadata device.
|
||||
* We search before smm->begin in case something has been freed.
|
||||
*/
|
||||
r = sm_ll_find_common_free_block(&smm->old_ll, &smm->ll, 0, smm->begin, b);
|
||||
}
|
||||
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
@@ -502,7 +510,6 @@ static int sm_metadata_commit(struct dm_space_map *sm)
|
||||
return r;
|
||||
|
||||
memcpy(&smm->old_ll, &smm->ll, sizeof(smm->old_ll));
|
||||
smm->begin = 0;
|
||||
smm->allocated_this_transaction = 0;
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -914,7 +914,7 @@ static int smscore_load_firmware_family2(struct smscore_device_t *coredev,
|
||||
void *buffer, size_t size)
|
||||
{
|
||||
struct sms_firmware *firmware = (struct sms_firmware *) buffer;
|
||||
struct sms_msg_data4 *msg;
|
||||
struct sms_msg_data5 *msg;
|
||||
u32 mem_address, calc_checksum = 0;
|
||||
u32 i, *ptr;
|
||||
u8 *payload = firmware->payload;
|
||||
@@ -995,24 +995,20 @@ static int smscore_load_firmware_family2(struct smscore_device_t *coredev,
|
||||
goto exit_fw_download;
|
||||
|
||||
if (coredev->mode == DEVICE_MODE_NONE) {
|
||||
struct sms_msg_data *trigger_msg =
|
||||
(struct sms_msg_data *) msg;
|
||||
|
||||
pr_debug("sending MSG_SMS_SWDOWNLOAD_TRIGGER_REQ\n");
|
||||
SMS_INIT_MSG(&msg->x_msg_header,
|
||||
MSG_SMS_SWDOWNLOAD_TRIGGER_REQ,
|
||||
sizeof(struct sms_msg_hdr) +
|
||||
sizeof(u32) * 5);
|
||||
sizeof(*msg));
|
||||
|
||||
trigger_msg->msg_data[0] = firmware->start_address;
|
||||
msg->msg_data[0] = firmware->start_address;
|
||||
/* Entry point */
|
||||
trigger_msg->msg_data[1] = 6; /* Priority */
|
||||
trigger_msg->msg_data[2] = 0x200; /* Stack size */
|
||||
trigger_msg->msg_data[3] = 0; /* Parameter */
|
||||
trigger_msg->msg_data[4] = 4; /* Task ID */
|
||||
msg->msg_data[1] = 6; /* Priority */
|
||||
msg->msg_data[2] = 0x200; /* Stack size */
|
||||
msg->msg_data[3] = 0; /* Parameter */
|
||||
msg->msg_data[4] = 4; /* Task ID */
|
||||
|
||||
rc = smscore_sendrequest_and_wait(coredev, trigger_msg,
|
||||
trigger_msg->x_msg_header.msg_length,
|
||||
rc = smscore_sendrequest_and_wait(coredev, msg,
|
||||
msg->x_msg_header.msg_length,
|
||||
&coredev->trigger_done);
|
||||
} else {
|
||||
SMS_INIT_MSG(&msg->x_msg_header, MSG_SW_RELOAD_EXEC_REQ,
|
||||
|
||||
@@ -636,9 +636,9 @@ struct sms_msg_data2 {
|
||||
u32 msg_data[2];
|
||||
};
|
||||
|
||||
struct sms_msg_data4 {
|
||||
struct sms_msg_data5 {
|
||||
struct sms_msg_hdr x_msg_header;
|
||||
u32 msg_data[4];
|
||||
u32 msg_data[5];
|
||||
};
|
||||
|
||||
struct sms_data_download {
|
||||
|
||||
@@ -1187,6 +1187,10 @@ static int smsdvb_hotplug(struct smscore_device_t *coredev,
|
||||
return 0;
|
||||
|
||||
media_graph_error:
|
||||
mutex_lock(&g_smsdvb_clientslock);
|
||||
list_del(&client->entry);
|
||||
mutex_unlock(&g_smsdvb_clientslock);
|
||||
|
||||
smsdvb_debugfs_release(client);
|
||||
|
||||
client_error:
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/nospec.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/dvb/net.h>
|
||||
#include <linux/uio.h>
|
||||
@@ -1350,14 +1351,20 @@ static int dvb_net_do_ioctl(struct file *file,
|
||||
struct net_device *netdev;
|
||||
struct dvb_net_priv *priv_data;
|
||||
struct dvb_net_if *dvbnetif = parg;
|
||||
int if_num = dvbnetif->if_num;
|
||||
|
||||
if (dvbnetif->if_num >= DVB_NET_DEVICES_MAX ||
|
||||
!dvbnet->state[dvbnetif->if_num]) {
|
||||
if (if_num >= DVB_NET_DEVICES_MAX) {
|
||||
ret = -EINVAL;
|
||||
goto ioctl_error;
|
||||
}
|
||||
if_num = array_index_nospec(if_num, DVB_NET_DEVICES_MAX);
|
||||
|
||||
if (!dvbnet->state[if_num]) {
|
||||
ret = -EINVAL;
|
||||
goto ioctl_error;
|
||||
}
|
||||
|
||||
netdev = dvbnet->device[dvbnetif->if_num];
|
||||
netdev = dvbnet->device[if_num];
|
||||
|
||||
priv_data = netdev_priv(netdev);
|
||||
dvbnetif->pid=priv_data->pid;
|
||||
@@ -1410,14 +1417,20 @@ static int dvb_net_do_ioctl(struct file *file,
|
||||
struct net_device *netdev;
|
||||
struct dvb_net_priv *priv_data;
|
||||
struct __dvb_net_if_old *dvbnetif = parg;
|
||||
int if_num = dvbnetif->if_num;
|
||||
|
||||
if (dvbnetif->if_num >= DVB_NET_DEVICES_MAX ||
|
||||
!dvbnet->state[dvbnetif->if_num]) {
|
||||
if (if_num >= DVB_NET_DEVICES_MAX) {
|
||||
ret = -EINVAL;
|
||||
goto ioctl_error;
|
||||
}
|
||||
if_num = array_index_nospec(if_num, DVB_NET_DEVICES_MAX);
|
||||
|
||||
if (!dvbnet->state[if_num]) {
|
||||
ret = -EINVAL;
|
||||
goto ioctl_error;
|
||||
}
|
||||
|
||||
netdev = dvbnet->device[dvbnetif->if_num];
|
||||
netdev = dvbnet->device[if_num];
|
||||
|
||||
priv_data = netdev_priv(netdev);
|
||||
dvbnetif->pid=priv_data->pid;
|
||||
|
||||
@@ -1393,7 +1393,7 @@ static int __s5c73m3_power_on(struct s5c73m3 *state)
|
||||
s5c73m3_gpio_deassert(state, STBY);
|
||||
usleep_range(100, 200);
|
||||
|
||||
s5c73m3_gpio_deassert(state, RST);
|
||||
s5c73m3_gpio_deassert(state, RSET);
|
||||
usleep_range(50, 100);
|
||||
|
||||
return 0;
|
||||
@@ -1408,7 +1408,7 @@ static int __s5c73m3_power_off(struct s5c73m3 *state)
|
||||
{
|
||||
int i, ret;
|
||||
|
||||
if (s5c73m3_gpio_assert(state, RST))
|
||||
if (s5c73m3_gpio_assert(state, RSET))
|
||||
usleep_range(10, 50);
|
||||
|
||||
if (s5c73m3_gpio_assert(state, STBY))
|
||||
@@ -1613,7 +1613,7 @@ static int s5c73m3_get_platform_data(struct s5c73m3 *state)
|
||||
|
||||
state->mclk_frequency = pdata->mclk_frequency;
|
||||
state->gpio[STBY] = pdata->gpio_stby;
|
||||
state->gpio[RST] = pdata->gpio_reset;
|
||||
state->gpio[RSET] = pdata->gpio_reset;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -361,7 +361,7 @@ struct s5c73m3_ctrls {
|
||||
|
||||
enum s5c73m3_gpio_id {
|
||||
STBY,
|
||||
RST,
|
||||
RSET,
|
||||
GPIO_NUM,
|
||||
};
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@ static const char * const s5k4ecgx_supply_names[] = {
|
||||
|
||||
enum s5k4ecgx_gpio_id {
|
||||
STBY,
|
||||
RST,
|
||||
RSET,
|
||||
GPIO_NUM,
|
||||
};
|
||||
|
||||
@@ -482,7 +482,7 @@ static int __s5k4ecgx_power_on(struct s5k4ecgx *priv)
|
||||
if (s5k4ecgx_gpio_set_value(priv, STBY, priv->gpio[STBY].level))
|
||||
usleep_range(30, 50);
|
||||
|
||||
if (s5k4ecgx_gpio_set_value(priv, RST, priv->gpio[RST].level))
|
||||
if (s5k4ecgx_gpio_set_value(priv, RSET, priv->gpio[RSET].level))
|
||||
usleep_range(30, 50);
|
||||
|
||||
return 0;
|
||||
@@ -490,7 +490,7 @@ static int __s5k4ecgx_power_on(struct s5k4ecgx *priv)
|
||||
|
||||
static int __s5k4ecgx_power_off(struct s5k4ecgx *priv)
|
||||
{
|
||||
if (s5k4ecgx_gpio_set_value(priv, RST, !priv->gpio[RST].level))
|
||||
if (s5k4ecgx_gpio_set_value(priv, RSET, !priv->gpio[RSET].level))
|
||||
usleep_range(30, 50);
|
||||
|
||||
if (s5k4ecgx_gpio_set_value(priv, STBY, !priv->gpio[STBY].level))
|
||||
@@ -878,7 +878,7 @@ static int s5k4ecgx_config_gpios(struct s5k4ecgx *priv,
|
||||
int ret;
|
||||
|
||||
priv->gpio[STBY].gpio = -EINVAL;
|
||||
priv->gpio[RST].gpio = -EINVAL;
|
||||
priv->gpio[RSET].gpio = -EINVAL;
|
||||
|
||||
ret = s5k4ecgx_config_gpio(gpio->gpio, gpio->level, "S5K4ECGX_STBY");
|
||||
|
||||
@@ -897,7 +897,7 @@ static int s5k4ecgx_config_gpios(struct s5k4ecgx *priv,
|
||||
s5k4ecgx_free_gpios(priv);
|
||||
return ret;
|
||||
}
|
||||
priv->gpio[RST] = *gpio;
|
||||
priv->gpio[RSET] = *gpio;
|
||||
if (gpio_is_valid(gpio->gpio))
|
||||
gpio_set_value(gpio->gpio, 0);
|
||||
|
||||
|
||||
@@ -238,7 +238,7 @@ struct s5k5baf_gpio {
|
||||
|
||||
enum s5k5baf_gpio_id {
|
||||
STBY,
|
||||
RST,
|
||||
RSET,
|
||||
NUM_GPIOS,
|
||||
};
|
||||
|
||||
@@ -973,7 +973,7 @@ static int s5k5baf_power_on(struct s5k5baf *state)
|
||||
|
||||
s5k5baf_gpio_deassert(state, STBY);
|
||||
usleep_range(50, 100);
|
||||
s5k5baf_gpio_deassert(state, RST);
|
||||
s5k5baf_gpio_deassert(state, RSET);
|
||||
return 0;
|
||||
|
||||
err_reg_dis:
|
||||
@@ -991,7 +991,7 @@ static int s5k5baf_power_off(struct s5k5baf *state)
|
||||
state->apply_cfg = 0;
|
||||
state->apply_crop = 0;
|
||||
|
||||
s5k5baf_gpio_assert(state, RST);
|
||||
s5k5baf_gpio_assert(state, RSET);
|
||||
s5k5baf_gpio_assert(state, STBY);
|
||||
|
||||
if (!IS_ERR(state->clock))
|
||||
|
||||
@@ -181,7 +181,7 @@ static const char * const s5k6aa_supply_names[] = {
|
||||
|
||||
enum s5k6aa_gpio_id {
|
||||
STBY,
|
||||
RST,
|
||||
RSET,
|
||||
GPIO_NUM,
|
||||
};
|
||||
|
||||
@@ -845,7 +845,7 @@ static int __s5k6aa_power_on(struct s5k6aa *s5k6aa)
|
||||
ret = s5k6aa->s_power(1);
|
||||
usleep_range(4000, 4000);
|
||||
|
||||
if (s5k6aa_gpio_deassert(s5k6aa, RST))
|
||||
if (s5k6aa_gpio_deassert(s5k6aa, RSET))
|
||||
msleep(20);
|
||||
|
||||
return ret;
|
||||
@@ -855,7 +855,7 @@ static int __s5k6aa_power_off(struct s5k6aa *s5k6aa)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (s5k6aa_gpio_assert(s5k6aa, RST))
|
||||
if (s5k6aa_gpio_assert(s5k6aa, RSET))
|
||||
usleep_range(100, 150);
|
||||
|
||||
if (s5k6aa->s_power) {
|
||||
@@ -1514,7 +1514,7 @@ static int s5k6aa_configure_gpios(struct s5k6aa *s5k6aa,
|
||||
int ret;
|
||||
|
||||
s5k6aa->gpio[STBY].gpio = -EINVAL;
|
||||
s5k6aa->gpio[RST].gpio = -EINVAL;
|
||||
s5k6aa->gpio[RSET].gpio = -EINVAL;
|
||||
|
||||
gpio = &pdata->gpio_stby;
|
||||
if (gpio_is_valid(gpio->gpio)) {
|
||||
@@ -1537,7 +1537,7 @@ static int s5k6aa_configure_gpios(struct s5k6aa *s5k6aa,
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
s5k6aa->gpio[RST] = *gpio;
|
||||
s5k6aa->gpio[RSET] = *gpio;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -1763,6 +1763,7 @@ static int tc358743_probe_of(struct tc358743_state *state)
|
||||
bps_pr_lane = 2 * endpoint->link_frequencies[0];
|
||||
if (bps_pr_lane < 62500000U || bps_pr_lane > 1000000000U) {
|
||||
dev_err(dev, "unsupported bps per lane: %u bps\n", bps_pr_lane);
|
||||
ret = -EINVAL;
|
||||
goto disable_clk;
|
||||
}
|
||||
|
||||
|
||||
@@ -494,6 +494,9 @@ static int bt878_probe(struct pci_dev *dev, const struct pci_device_id *pci_id)
|
||||
btwrite(0, BT878_AINT_MASK);
|
||||
bt878_num++;
|
||||
|
||||
if (!bt->tasklet.func)
|
||||
tasklet_disable(&bt->tasklet);
|
||||
|
||||
return 0;
|
||||
|
||||
fail2:
|
||||
|
||||
@@ -689,6 +689,7 @@ static int cobalt_probe(struct pci_dev *pci_dev,
|
||||
return -ENOMEM;
|
||||
cobalt->pci_dev = pci_dev;
|
||||
cobalt->instance = i;
|
||||
mutex_init(&cobalt->pci_lock);
|
||||
|
||||
retval = v4l2_device_register(&pci_dev->dev, &cobalt->v4l2_dev);
|
||||
if (retval) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user