Skip to content

Commit a754733

Browse files
andy-shevHans Verkuil
authored andcommitted
media: atomisp: Remove unused GPIO related defines and APIs
Remove unused GPIO related defines and APIs. Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
1 parent 92a643e commit a754733

File tree

7 files changed

+7
-165
lines changed

7 files changed

+7
-165
lines changed

drivers/staging/media/atomisp/pci/gpio_block_defs.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,10 @@
1616
#ifndef _gpio_block_defs_h_
1717
#define _gpio_block_defs_h_
1818

19-
#define _HRT_GPIO_BLOCK_REG_ALIGN 4
20-
2119
/* R/W registers */
2220
#define _gpio_block_reg_do_e 0
2321
#define _gpio_block_reg_do_select 1
2422
#define _gpio_block_reg_do_0 2
2523
#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
4124

4225
#endif /* _gpio_block_defs_h_ */

drivers/staging/media/atomisp/pci/hive_isp_css_common/gpio_global.h

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,31 +16,8 @@
1616
#ifndef __GPIO_GLOBAL_H_INCLUDED__
1717
#define __GPIO_GLOBAL_H_INCLUDED__
1818

19-
#define IS_GPIO_VERSION_1
20-
2119
#include <gpio_block_defs.h>
2220

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-
4421
#define HIVE_GPIO_STROBE_TRIGGER_PIN 2
4522

4623
#endif /* __GPIO_GLOBAL_H_INCLUDED__ */

drivers/staging/media/atomisp/pci/hive_isp_css_common/host/gpio_local.h

Lines changed: 0 additions & 21 deletions
This file was deleted.

drivers/staging/media/atomisp/pci/hive_isp_css_common/host/gpio_private.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,10 @@
1616
#ifndef __GPIO_PRIVATE_H_INCLUDED__
1717
#define __GPIO_PRIVATE_H_INCLUDED__
1818

19-
#include "gpio_public.h"
20-
21-
#include "device_access.h"
22-
2319
#include "assert_support.h"
20+
#include "device_access.h"
2421

25-
STORAGE_CLASS_GPIO_C void gpio_reg_store(
22+
static inline void gpio_reg_store(
2623
const gpio_ID_t ID,
2724
const unsigned int reg,
2825
const hrt_data value)
@@ -33,7 +30,7 @@ STORAGE_CLASS_GPIO_C void gpio_reg_store(
3330
return;
3431
}
3532

36-
STORAGE_CLASS_GPIO_C hrt_data gpio_reg_load(
33+
static inline hrt_data gpio_reg_load(
3734
const gpio_ID_t ID,
3835
const unsigned int reg)
3936
{

drivers/staging/media/atomisp/pci/hive_isp_css_include/gpio.h

Lines changed: 0 additions & 46 deletions
This file was deleted.

drivers/staging/media/atomisp/pci/hive_isp_css_include/host/gpio_public.h

Lines changed: 0 additions & 46 deletions
This file was deleted.

drivers/staging/media/atomisp/pci/sh_css.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@
6666
#include "sp.h" /* cnd_sp_irq_enable() */
6767
#include "isp.h" /* cnd_isp_irq_enable, ISP_VEC_NELEMS */
6868
#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>
7171
#include "timed_ctrl.h"
7272
#include "ia_css_inputfifo.h"
7373
#define WITH_PC_MONITORING 0
@@ -1363,10 +1363,8 @@ ia_css_init(struct device *dev, const struct ia_css_env *env,
13631363

13641364
ia_css_device_access_init(&env->hw_access_env);
13651365

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;
13701368
sh_css_mmu_set_page_table_base_index(mmu_l1_base);
13711369

13721370
my_css_save.mmu_base = mmu_l1_base;

0 commit comments

Comments
 (0)