| /linux/drivers/gpu/drm/nouveau/ |
| H A D | nouveau_backlight.c | 33 #include <linux/apple-gmux.h> 45 #define BL_NAME_SIZE 24 // 12 for name + 11 for digits + 1 for '\0' 49 struct nouveau_backlight *bl) in nouveau_get_backlight_name() argument 59 bl->id = nb; in nouveau_get_backlight_name() 67 struct nouveau_drm *drm = nouveau_drm(nv_encoder->base.base.dev); in nv40_get_intensity() 68 struct nvif_object *device = &drm->client.device.object; in nv40_get_intensity() 79 struct nouveau_drm *drm = nouveau_drm(nv_encoder->base.base.dev); in nv40_set_intensity() 80 struct nvif_object *device = &drm->client.device.object; in nv40_set_intensity() 81 int val = bd->props.brightness; in nv40_set_intensity() 101 struct nouveau_drm *drm = nouveau_drm(encoder->base.base.dev); in nv40_backlight_init() [all …]
|
| /linux/drivers/video/backlight/ |
| H A D | lp8788_bl.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * TI LP8788 MFD - backlight driver 31 #define DEFAULT_BL_NAME "lcd-backlight" 38 static int lp8788_backlight_configure(struct lp8788_bl *bl) in lp8788_backlight_configure() argument 45 ret = lp8788_write_byte(bl->lp, LP8788_BL_RAMP, val); in lp8788_backlight_configure() 56 return lp8788_write_byte(bl->lp, LP8788_BL_CONFIG, val); in lp8788_backlight_configure() 61 struct lp8788_bl *bl = bl_get_data(bl_dev); in lp8788_bl_update_status() local 63 if (bl_dev->props.state & BL_CORE_SUSPENDED) in lp8788_bl_update_status() 64 bl_dev->props.brightness = 0; in lp8788_bl_update_status() 66 lp8788_write_byte(bl->lp, LP8788_BL_BRIGHTNESS, bl_dev->props.brightness); in lp8788_bl_update_status() [all …]
|
| H A D | lm3533_bl.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * lm3533-bl.c -- LM3533 Backlight driver 5 * Copyright (C) 2011-2012 Texas Instruments 33 static inline int lm3533_bl_get_ctrlbank_id(struct lm3533_bl *bl) in lm3533_bl_get_ctrlbank_id() argument 35 return bl->id; in lm3533_bl_get_ctrlbank_id() 40 struct lm3533_bl *bl = bl_get_data(bd); in lm3533_bl_update_status() local 42 return lm3533_ctrlbank_set_brightness(&bl->cb, backlight_get_brightness(bd)); in lm3533_bl_update_status() 47 struct lm3533_bl *bl = bl_get_data(bd); in lm3533_bl_get_brightness() local 51 ret = lm3533_ctrlbank_get_brightness(&bl->cb, &val); in lm3533_bl_get_brightness() 66 struct lm3533_bl *bl = dev_get_drvdata(dev); in show_id() local [all …]
|
| H A D | pandora_bl.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * Pandora uses TWL4030 PWM0 -> TPS61161 combo for control backlight. 32 #define MAX_USER_VALUE (MAX_VALUE - MIN_VALUE) 39 static int pandora_backlight_update_status(struct backlight_device *bl) in pandora_backlight_update_status() argument 41 int brightness = bl->props.brightness; in pandora_backlight_update_status() 42 struct pandora_private *priv = bl_get_data(bl); in pandora_backlight_update_status() 45 if (bl->props.power != BACKLIGHT_POWER_ON) in pandora_backlight_update_status() 47 if (bl->props.state & BL_CORE_FBBLANK) in pandora_backlight_update_status() 49 if (bl->props.state & BL_CORE_SUSPENDED) in pandora_backlight_update_status() 56 if (priv->old_state == PANDORABL_WAS_OFF) in pandora_backlight_update_status() [all …]
|
| H A D | arcxcnn_bl.c | 1 // SPDX-License-Identifier: GPL-2.0-only 22 * @name : Backlight driver name (NULL will use default) 33 const char *name; member 48 #define ARCXCNN_CMD_OVP_MASK 0x0C /* --- Over Voltage Threshold */ 63 #define ARCXCNN_LEDEN_ISETEXT 0x80 /* Full-scale current set extern */ 89 struct backlight_device *bl; member 99 ret = i2c_smbus_read_byte_data(lp->client, reg); in arcxcnn_update_field() 101 dev_err(lp->dev, "failed to read 0x%.2x\n", reg); in arcxcnn_update_field() 109 return i2c_smbus_write_byte_data(lp->client, reg, tmp); in arcxcnn_update_field() 119 ret = i2c_smbus_write_byte_data(lp->client, in arcxcnn_set_brightness() [all …]
|
| H A D | gpio_backlight.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * gpio_backlight.c - Simple GPIO-controlled backlight 23 static int gpio_backlight_update_status(struct backlight_device *bl) in gpio_backlight_update_status() argument 25 struct gpio_backlight *gbl = bl_get_data(bl); in gpio_backlight_update_status() 27 gpiod_set_value_cansleep(gbl->gpiod, backlight_get_brightness(bl)); in gpio_backlight_update_status() 32 static bool gpio_backlight_controls_device(struct backlight_device *bl, in gpio_backlight_controls_device() argument 35 struct gpio_backlight *gbl = bl_get_data(bl); in gpio_backlight_controls_device() 37 return !gbl->dev || gbl->dev == display_dev; in gpio_backlight_controls_device() 48 struct device *dev = &pdev->dev; in gpio_backlight_probe() 50 struct device_node *of_node = dev->of_node; in gpio_backlight_probe() [all …]
|
| H A D | lm3639_bl.c | 1 // SPDX-License-Identifier: GPL-2.0-only 51 struct lm3639_platform_data *pdata = pchip->pdata; in lm3639_chip_init() 55 regmap_update_bits(pchip->regmap, REG_BL_CONF_1, 0x08, in lm3639_chip_init() 56 pdata->pin_pwm); in lm3639_chip_init() 60 reg_val = (pdata->pin_pwm & 0x40) | pdata->pin_strobe | pdata->pin_tx; in lm3639_chip_init() 61 ret = regmap_update_bits(pchip->regmap, REG_IO_CTRL, 0x7C, reg_val); in lm3639_chip_init() 66 ret = regmap_write(pchip->regmap, REG_BL_CONF_4, pdata->init_brt_led); in lm3639_chip_init() 70 ret = regmap_write(pchip->regmap, REG_BL_CONF_3, pdata->init_brt_led); in lm3639_chip_init() 75 if (!pdata->init_brt_led) { in lm3639_chip_init() 76 reg_val = pdata->fled_pins; in lm3639_chip_init() [all …]
|
| H A D | lm3509_bl.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 48 if (data->reset_gpio) { in lm3509_reset() 49 gpiod_set_value(data->reset_gpio, 1); in lm3509_reset() 51 gpiod_set_value(data->reset_gpio, 0); in lm3509_reset() 56 static int lm3509_update_status(struct backlight_device *bl, in lm3509_update_status() argument 59 struct lm3509_bl *data = bl_get_data(bl); in lm3509_update_status() 63 ret = regmap_write(data->regmap, br_reg, backlight_get_brightness(bl)); in lm3509_update_status() 67 en = !backlight_is_blank(bl); in lm3509_update_status() 68 return regmap_update_bits(data->regmap, REG_GP, en_mask, in lm3509_update_status() 72 static int lm3509_main_update_status(struct backlight_device *bl) in lm3509_main_update_status() argument [all …]
|
| H A D | ktd253-backlight.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * Based on code and know-how from the Samsung GT-S7710 32 struct backlight_device *bl; member 39 gpiod_set_value_cansleep(ktd253->gpiod, 1); in ktd253_backlight_set_max_ratio() 62 gpiod_set_value(ktd253->gpiod, 0); in ktd253_backlight_stepdown() 64 gpiod_set_value(ktd253->gpiod, 1); in ktd253_backlight_stepdown() 65 ns = ktime_get_ns() - ns; in ktd253_backlight_stepdown() 67 dev_err(ktd253->dev, "PCM on backlight took too long (%llu ns)\n", ns); in ktd253_backlight_stepdown() 68 return -EAGAIN; in ktd253_backlight_stepdown() 74 static int ktd253_backlight_update_status(struct backlight_device *bl) in ktd253_backlight_update_status() argument [all …]
|
| /linux/drivers/gpu/drm/tegra/ |
| H A D | riscv.c | 1 // SPDX-License-Identifier: GPL-2.0-only 34 writel(value, riscv->regs + offset); in riscv_writel() 39 struct tegra_drm_riscv_descriptor *bl = &riscv->bl_desc; in tegra_drm_riscv_read_descriptors() local 40 struct tegra_drm_riscv_descriptor *os = &riscv->os_desc; in tegra_drm_riscv_read_descriptors() 41 const struct device_node *np = riscv->dev->of_node; in tegra_drm_riscv_read_descriptors() 44 #define READ_PROP(name, location) \ in tegra_drm_riscv_read_descriptors() argument 45 err = of_property_read_u32(np, name, location); \ in tegra_drm_riscv_read_descriptors() 47 dev_err(riscv->dev, "failed to read " name ": %d\n", err); \ in tegra_drm_riscv_read_descriptors() 51 READ_PROP("nvidia,bl-manifest-offset", &bl->manifest_offset); in tegra_drm_riscv_read_descriptors() 52 READ_PROP("nvidia,bl-code-offset", &bl->code_offset); in tegra_drm_riscv_read_descriptors() [all …]
|
| /linux/fs/hpfs/ |
| H A D | dentry.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Mikulas Patocka (mikulas@artax.karlin.mff.cuni.cz), 1998-1999 20 unsigned l = qstr->len; in hpfs_hash_dentry() 22 if (l == 1) if (qstr->name[0]=='.') goto x; in hpfs_hash_dentry() 23 if (l == 2) if (qstr->name[0]=='.' || qstr->name[1]=='.') goto x; in hpfs_hash_dentry() 24 hpfs_adjust_length(qstr->name, &l); in hpfs_hash_dentry() 25 /*if (hpfs_chk_name(qstr->name,&l))*/ in hpfs_hash_dentry() 26 /*return -ENAMETOOLONG;*/ in hpfs_hash_dentry() 27 /*return -ENOENT;*/ in hpfs_hash_dentry() 32 hash = partial_name_hash(hpfs_upcase(hpfs_sb(dentry->d_sb)->sb_cp_table,qstr->name[i]), hash); in hpfs_hash_dentry() [all …]
|
| /linux/arch/powerpc/kernel/ |
| H A D | interrupt_64.S | 1 #include <asm/asm-offsets.h> 4 #include <asm/exception-64s.h> 6 #include <asm/exception-64e.h> 8 #include <asm/feature-fixups.h> 9 #include <asm/head-64.h> 47 .macro system_call_vectored name trapnr 48 .globl system_call_vectored_\name 49 system_call_vectored_\name: 50 _ASM_NOKPROBE_SYMBOL(system_call_vectored_\name) 64 /* Save syscall parameters in r3-r8 */ [all …]
|
| H A D | vector.S | 1 /* SPDX-License-Identifier: GPL-2.0 */ 7 #include <asm/asm-offsets.h> 12 #include <asm/asm-compat.h> 47 * Note that on 32-bit this can only use registers that will be 48 * restored by fast_exception_return, i.e. r3 - r6, r10 and r11. 69 li r4,-1 119 #error This asm code isn't ready for 32-bit kernels 158 * usage of floating-point registers. These routines must be called 166 .long 0x3f800000 /* 1.0 in single-precision FP */ 168 .long 0x3f000000 /* 0.5 in single-precision FP */ [all …]
|
| H A D | head_32.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 13 .macro EXCEPTION_PROLOG trapno name handle_dar_dsisr=0 16 EXCEPTION_PROLOG_2 \trapno \name handle_dar_dsisr=\handle_dar_dsisr 42 lwz r1,TASK_STACK-THREAD(r1) 43 addi r1, r1, THREAD_SIZE - INT_FRAME_SIZE 47 bt 32 - THREAD_ALIGN_SHIFT, vmap_stack_overflow 51 .macro EXCEPTION_PROLOG_2 trapno name handle_dar_dsisr=0 58 LOAD_REG_IMMEDIATE(r11, MSR_KERNEL & ~MSR_RI) /* re-enable MMU */ 67 \name\()_virt: 98 _ASM_NOKPROBE_SYMBOL(\name\()_virt) [all …]
|
| H A D | exceptions-64e.S | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 13 #include <asm/asm-offsets.h> 17 #include <asm/exception-64e.h> 21 #include <asm/ppc-opcode.h> 26 #include <asm/feature-fixups.h> 36 * special interrupts from within a non-standard level will probably 57 /* must be even to keep 16-byte stack alignment */ 61 #define SPECIAL_EXC_FRAME_OFFS (INT_FRAME_SIZE - 288) 63 #define SPECIAL_EXC_STORE(reg, name) \ argument 64 std reg, (SPECIAL_EXC_##name * 8 + SPECIAL_EXC_FRAME_OFFS)(r1) [all …]
|
| /linux/arch/arm64/kernel/ |
| H A D | ftrace.c | 1 // SPDX-License-Identifier: GPL-2.0-only 15 #include <asm/debug-monitors.h> 18 #include <asm/text-patching.h> 22 const char *name; member 28 .name = n, \ 51 int ftrace_regs_query_register_offset(const char *name) in ftrace_regs_query_register_offset() argument 55 if (!strcmp(roff->name, name)) in ftrace_regs_query_register_offset() 56 return roff->offset; in ftrace_regs_query_register_offset() 59 return -EINVAL; in ftrace_regs_query_register_offset() 73 * When using patchable-function-entry without pre-function NOPS, addr in ftrace_call_adjust() [all …]
|
| /linux/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ |
| H A D | fwsec.c | 91 union nvfw_falcon_appif_hdr *hdr = (void *)(fw->fw.img + fw->dmem_base_img + if_offset); in nvkm_gsp_fwsec_patch() 92 const u8 *dmem = fw->fw.img + fw->dmem_base_img; in nvkm_gsp_fwsec_patch() 95 if (WARN_ON(hdr->v1.ver != 1)) in nvkm_gsp_fwsec_patch() 96 return -EINVAL; in nvkm_gsp_fwsec_patch() 98 for (i = 0; i < hdr->v1.cnt; i++) { in nvkm_gsp_fwsec_patch() 99 union nvfw_falcon_appif *app = (void *)((u8 *)hdr + hdr->v1.hdr + i * hdr->v1.len); in nvkm_gsp_fwsec_patch() 103 if (app->v1.id != NVFW_FALCON_APPIF_ID_DMEMMAPPER) in nvkm_gsp_fwsec_patch() 106 dmemmap = (void *)(dmem + app->v1.dmem_base); in nvkm_gsp_fwsec_patch() 107 dmemmap->v3.init_cmd = init_cmd; in nvkm_gsp_fwsec_patch() 109 frtscmd = (void *)(dmem + dmemmap->v3.cmd_in_buffer_offset); in nvkm_gsp_fwsec_patch() [all …]
|
| /linux/arch/powerpc/include/asm/ |
| H A D | fsl_hcalls.h | 4 * Copyright 2008-2010 Freescale Semiconductor, Inc. 18 * * Neither the name of Freescale Semiconductor nor the 74 * 32-bit integer on a 32-bit platform, and a 64-bit integer on a 64-bit 79 * input/output registers are represented with "+r". Output-only registers 86 * fh_send_nmi - send NMI to virtual cpu(s). 99 asm volatile("bl epapr_hypercall_start" in fh_send_nmi() 112 * fh_partition_get_dtprop - get a property from a guest device tree. 115 * @propname_addr: physical address of name of property 119 * Returns zero on success, non-zero on error. 154 asm volatile("bl epapr_hypercall_start" in fh_partition_get_dtprop() [all …]
|
| /linux/drivers/pinctrl/sunplus/ |
| H A D | sppctl.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 33 * Mask-fields and control-fields of MOON registers of SP7021 are 36 * register | mask-fields | control-fields 37 * ----------+--------------+---------------- 43 * where mask-fields are used to protect control-fields from write-in 44 * accidentally. Set the corresponding bits in the mask-field before 45 * you write a value into a control-field. 53 #define FNCE(n, r, o, bo, bl, g) { \ argument 54 .name = n, \ 58 .blen = bl, \ [all …]
|
| /linux/drivers/regulator/ |
| H A D | rpi-panel-attiny-regulator.c | 1 // SPDX-License-Identifier: GPL-2.0 85 state->port_states[reg - REG_PORTA] = val; in attiny_set_port_state() 86 return regmap_write(state->regmap, reg, val); in attiny_set_port_state() 91 return state->port_states[reg - REG_PORTA]; in attiny_get_port_state() 98 guard(mutex)(&state->lock); in attiny_lcd_power_enable() 126 guard(mutex)(&state->lock); in attiny_lcd_power_disable() 128 regmap_write(rdev->regmap, REG_PWM, 0); in attiny_lcd_power_disable() 147 scoped_guard(mutex, &state->lock) { in attiny_lcd_power_is_enabled() 149 ret = regmap_read(rdev->regmap, REG_PORTC, &data); in attiny_lcd_power_is_enabled() 175 .name = "tc358762-power", [all …]
|
| /linux/arch/powerpc/kvm/ |
| H A D | fpu.S | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 18 #include <asm/asm-offsets.h> 29 #define FPS_ONE_IN(name) \ argument 30 _GLOBAL(fps_ ## name); \ 35 name 0,0; \ 50 #define FPS_TWO_IN(name) \ argument 51 _GLOBAL(fps_ ## name); \ 57 name 0,0,1; \ 73 #define FPS_THREE_IN(name) \ argument 74 _GLOBAL(fps_ ## name); \ [all …]
|
| H A D | book3s_interrupts.S | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 13 #include <asm/asm-offsets.h> 14 #include <asm/exception-64s.h> 15 #include <asm/asm-compat.h> 19 #define FUNC(name) name argument 21 #define FUNC(name) GLUE(.,name) argument 26 #define FUNC(name) name argument 68 PPC_STLU r1, -SWITCH_FRAME_SIZE(r1) 73 /* Save non-volatile registers (r14 - r31) */ 83 /* Load non-volatile guest state from the vcpu */ [all …]
|
| /linux/drivers/gpu/drm/nouveau/nvkm/subdev/acr/ |
| H A D | tu102.c | 49 /*XXX: shared sub-WPR headers, fill terminator for now. */ in tu102_acr_wpr_build() 50 nvkm_wo32(acr->wpr, 0x200, 0xffffffff); in tu102_acr_wpr_build() 52 /* Fill per-LSF structures. */ in tu102_acr_wpr_build() 53 list_for_each_entry(lsfw, &acr->lsfw, head) { in tu102_acr_wpr_build() 54 struct lsf_signature_v1 *sig = (void *)lsfw->sig->data; in tu102_acr_wpr_build() 56 .falcon_id = lsfw->id, in tu102_acr_wpr_build() 57 .lsb_offset = lsfw->offset.lsb, in tu102_acr_wpr_build() 60 .bin_version = sig->version, in tu102_acr_wpr_build() 65 nvkm_wobj(acr->wpr, offset, &hdr, sizeof(hdr)); in tu102_acr_wpr_build() 74 nvkm_wobj(acr->wpr, lsfw->offset.img, in tu102_acr_wpr_build() [all …]
|
| /linux/fs/nfs/blocklayout/ |
| H A D | blocklayout.c | 14 * so long as the name of the university of michigan is not used in 54 switch (be->be_state) { in is_hole() 58 return be->be_tag ? false : true; in is_hole() 79 rv->data = data; in alloc_parallel() 80 kref_init(&rv->refcnt); in alloc_parallel() 87 kref_get(&p->refcnt); in get_parallel() 95 p->pnfs_callback(p->data); in destroy_parallel() 101 kref_put(&p->refcnt, destroy_parallel); in put_parallel() 108 get_parallel(bio->bi_private); in bl_submit_bio() 111 bio->bi_iter.bi_size, in bl_submit_bio() [all …]
|
| /linux/arch/arm64/boot/dts/qcom/ |
| H A D | x1e78100-lenovo-thinkpad-t14s.dts | 1 // SPDX-License-Identifier: BSD-3-Clause 6 #include "x1e78100-lenovo-thinkpad-t14s.dtsi" 10 compatible = "lenovo,thinkpad-t14s-lcd", "lenovo,thinkpad-t14s", 14 compatible = "pwm-backlight"; 16 enable-gpios = <&pmc8380_3_gpios 4 GPIO_ACTIVE_HIGH>; 17 power-supply = <&vreg_edp_bl>; 19 pinctrl-0 = <&edp_bl_en>, <&edp_bl_pwm>; 20 pinctrl-names = "default"; 23 vreg_edp_bl: regulator-edp-bl { 24 compatible = "regulator-fixed"; [all …]
|