Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

media: atomisp: Remove unused GPIO related defines and APIs

Remove unused GPIO related defines and APIs.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240424210800.1776038-1-andriy.shevchenko@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>

authored by

Andy Shevchenko and committed by
Hans Verkuil
a7547337 92a643ee

+7 -165
-17
drivers/staging/media/atomisp/pci/gpio_block_defs.h
··· 16 16 #ifndef _gpio_block_defs_h_ 17 17 #define _gpio_block_defs_h_ 18 18 19 - #define _HRT_GPIO_BLOCK_REG_ALIGN 4 20 - 21 19 /* R/W registers */ 22 20 #define _gpio_block_reg_do_e 0 23 21 #define _gpio_block_reg_do_select 1 24 22 #define _gpio_block_reg_do_0 2 25 23 #define _gpio_block_reg_do_1 3 26 - #define _gpio_block_reg_do_pwm_cnt_0 4 27 - #define _gpio_block_reg_do_pwm_cnt_1 5 28 - #define _gpio_block_reg_do_pwm_cnt_2 6 29 - #define _gpio_block_reg_do_pwm_cnt_3 7 30 - #define _gpio_block_reg_do_pwm_main_cnt 8 31 - #define _gpio_block_reg_do_pwm_enable 9 32 - #define _gpio_block_reg_di_debounce_sel 10 33 - #define _gpio_block_reg_di_debounce_cnt_0 11 34 - #define _gpio_block_reg_di_debounce_cnt_1 12 35 - #define _gpio_block_reg_di_debounce_cnt_2 13 36 - #define _gpio_block_reg_di_debounce_cnt_3 14 37 - #define _gpio_block_reg_di_active_level 15 38 - 39 - /* read-only registers */ 40 - #define _gpio_block_reg_di 16 41 24 42 25 #endif /* _gpio_block_defs_h_ */
-23
drivers/staging/media/atomisp/pci/hive_isp_css_common/gpio_global.h
··· 16 16 #ifndef __GPIO_GLOBAL_H_INCLUDED__ 17 17 #define __GPIO_GLOBAL_H_INCLUDED__ 18 18 19 - #define IS_GPIO_VERSION_1 20 - 21 19 #include <gpio_block_defs.h> 22 - 23 - /* pqiao: following part only defines in hive_isp_css_defs.h in fpga system. 24 - port it here 25 - */ 26 - 27 - /* GPIO pin defines */ 28 - /*#define HIVE_GPIO_CAMERA_BOARD_RESET_PIN_NR 0 29 - #define HIVE_GPIO_LCD_CLOCK_SELECT_PIN_NR 7 30 - #define HIVE_GPIO_HDMI_CLOCK_SELECT_PIN_NR 8 31 - #define HIVE_GPIO_LCD_VERT_FLIP_PIN_NR 8 32 - #define HIVE_GPIO_LCD_HOR_FLIP_PIN_NR 9 33 - #define HIVE_GPIO_AS3683_GPIO_P0_PIN_NR 1 34 - #define HIVE_GPIO_AS3683_DATA_P1_PIN_NR 2 35 - #define HIVE_GPIO_AS3683_CLK_P2_PIN_NR 3 36 - #define HIVE_GPIO_AS3683_T1_F0_PIN_NR 4 37 - #define HIVE_GPIO_AS3683_SFL_F1_PIN_NR 5 38 - #define HIVE_GPIO_AS3683_STROBE_F2_PIN_NR 6 39 - #define HIVE_GPIO_MAX1577_EN1_PIN_NR 1 40 - #define HIVE_GPIO_MAX1577_EN2_PIN_NR 2 41 - #define HIVE_GPIO_MAX8685A_EN_PIN_NR 3 42 - #define HIVE_GPIO_MAX8685A_TRIG_PIN_NR 4*/ 43 20 44 21 #define HIVE_GPIO_STROBE_TRIGGER_PIN 2 45 22
-21
drivers/staging/media/atomisp/pci/hive_isp_css_common/host/gpio_local.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - /* 3 - * Support for Intel Camera Imaging ISP subsystem. 4 - * Copyright (c) 2010-2015, Intel Corporation. 5 - * 6 - * This program is free software; you can redistribute it and/or modify it 7 - * under the terms and conditions of the GNU General Public License, 8 - * version 2, as published by the Free Software Foundation. 9 - * 10 - * This program is distributed in the hope it will be useful, but WITHOUT 11 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 13 - * more details. 14 - */ 15 - 16 - #ifndef __GPIO_LOCAL_H_INCLUDED__ 17 - #define __GPIO_LOCAL_H_INCLUDED__ 18 - 19 - #include "gpio_global.h" 20 - 21 - #endif /* __GPIO_LOCAL_H_INCLUDED__ */
+3 -6
drivers/staging/media/atomisp/pci/hive_isp_css_common/host/gpio_private.h
··· 16 16 #ifndef __GPIO_PRIVATE_H_INCLUDED__ 17 17 #define __GPIO_PRIVATE_H_INCLUDED__ 18 18 19 - #include "gpio_public.h" 20 - 19 + #include "assert_support.h" 21 20 #include "device_access.h" 22 21 23 - #include "assert_support.h" 24 - 25 - STORAGE_CLASS_GPIO_C void gpio_reg_store( 22 + static inline void gpio_reg_store( 26 23 const gpio_ID_t ID, 27 24 const unsigned int reg, 28 25 const hrt_data value) ··· 30 33 return; 31 34 } 32 35 33 - STORAGE_CLASS_GPIO_C hrt_data gpio_reg_load( 36 + static inline hrt_data gpio_reg_load( 34 37 const gpio_ID_t ID, 35 38 const unsigned int reg) 36 39 {
-46
drivers/staging/media/atomisp/pci/hive_isp_css_include/gpio.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - /* 3 - * Support for Intel Camera Imaging ISP subsystem. 4 - * Copyright (c) 2015, Intel Corporation. 5 - * 6 - * This program is free software; you can redistribute it and/or modify it 7 - * under the terms and conditions of the GNU General Public License, 8 - * version 2, as published by the Free Software Foundation. 9 - * 10 - * This program is distributed in the hope it will be useful, but WITHOUT 11 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 13 - * more details. 14 - */ 15 - 16 - #ifndef __GPIO_H_INCLUDED__ 17 - #define __GPIO_H_INCLUDED__ 18 - 19 - /* 20 - * This file is included on every cell {SP,ISP,host} and on every system 21 - * that uses the input system device(s). It defines the API to DLI bridge 22 - * 23 - * System and cell specific interfaces and inline code are included 24 - * conditionally through Makefile path settings. 25 - * 26 - * - . system and cell agnostic interfaces, constants and identifiers 27 - * - public: system agnostic, cell specific interfaces 28 - * - private: system dependent, cell specific interfaces & inline implementations 29 - * - global: system specific constants and identifiers 30 - * - local: system and cell specific constants and identifiers 31 - */ 32 - 33 - #include "system_local.h" 34 - #include "gpio_local.h" 35 - 36 - #ifndef __INLINE_GPIO__ 37 - #define STORAGE_CLASS_GPIO_H extern 38 - #define STORAGE_CLASS_GPIO_C 39 - #include "gpio_public.h" 40 - #else /* __INLINE_GPIO__ */ 41 - #define STORAGE_CLASS_GPIO_H static inline 42 - #define STORAGE_CLASS_GPIO_C static inline 43 - #include "gpio_private.h" 44 - #endif /* __INLINE_GPIO__ */ 45 - 46 - #endif /* __GPIO_H_INCLUDED__ */
-46
drivers/staging/media/atomisp/pci/hive_isp_css_include/host/gpio_public.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - /* 3 - * Support for Intel Camera Imaging ISP subsystem. 4 - * Copyright (c) 2015, Intel Corporation. 5 - * 6 - * This program is free software; you can redistribute it and/or modify it 7 - * under the terms and conditions of the GNU General Public License, 8 - * version 2, as published by the Free Software Foundation. 9 - * 10 - * This program is distributed in the hope it will be useful, but WITHOUT 11 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 13 - * more details. 14 - */ 15 - 16 - #ifndef __GPIO_PUBLIC_H_INCLUDED__ 17 - #define __GPIO_PUBLIC_H_INCLUDED__ 18 - 19 - #include "system_local.h" 20 - 21 - /*! Write to a control register of GPIO[ID] 22 - 23 - \param ID[in] GPIO identifier 24 - \param reg_addr[in] register byte address 25 - \param value[in] The data to be written 26 - 27 - \return none, GPIO[ID].ctrl[reg] = value 28 - */ 29 - STORAGE_CLASS_GPIO_H void gpio_reg_store( 30 - const gpio_ID_t ID, 31 - const unsigned int reg_addr, 32 - const hrt_data value); 33 - 34 - /*! Read from a control register of GPIO[ID] 35 - 36 - \param ID[in] GPIO identifier 37 - \param reg_addr[in] register byte address 38 - \param value[in] The data to be written 39 - 40 - \return GPIO[ID].ctrl[reg] 41 - */ 42 - STORAGE_CLASS_GPIO_H hrt_data gpio_reg_load( 43 - const gpio_ID_t ID, 44 - const unsigned int reg_addr); 45 - 46 - #endif /* __GPIO_PUBLIC_H_INCLUDED__ */
+4 -6
drivers/staging/media/atomisp/pci/sh_css.c
··· 66 66 #include "sp.h" /* cnd_sp_irq_enable() */ 67 67 #include "isp.h" /* cnd_isp_irq_enable, ISP_VEC_NELEMS */ 68 68 #include "gp_device.h" /* gp_device_reg_store() */ 69 - #define __INLINE_GPIO__ 70 - #include "gpio.h" 69 + #include <gpio_global.h> 70 + #include <gpio_private.h> 71 71 #include "timed_ctrl.h" 72 72 #include "ia_css_inputfifo.h" 73 73 #define WITH_PC_MONITORING 0 ··· 1363 1363 1364 1364 ia_css_device_access_init(&env->hw_access_env); 1365 1365 1366 - select = gpio_reg_load(GPIO0_ID, _gpio_block_reg_do_select) 1367 - & (~GPIO_FLASH_PIN_MASK); 1368 - enable = gpio_reg_load(GPIO0_ID, _gpio_block_reg_do_e) 1369 - | GPIO_FLASH_PIN_MASK; 1366 + select = gpio_reg_load(GPIO0_ID, _gpio_block_reg_do_select) & ~GPIO_FLASH_PIN_MASK; 1367 + enable = gpio_reg_load(GPIO0_ID, _gpio_block_reg_do_e) | GPIO_FLASH_PIN_MASK; 1370 1368 sh_css_mmu_set_page_table_base_index(mmu_l1_base); 1371 1369 1372 1370 my_css_save.mmu_base = mmu_l1_base;