@@ -63,7 +63,7 @@ struct drv_data {
63
63
int aux ;
64
64
};
65
65
66
- void driver_cxd5605_nmea_cb (struct gnss_global_data * pvt )
66
+ static void driver_cxd5605_nmea_cb (struct gnss_global_data * pvt )
67
67
{
68
68
#ifdef DEBUG
69
69
memcpy (& drv_data -> pvt , pvt , sizeof (struct gnss_global_data ));
@@ -102,7 +102,7 @@ void driver_cxd5605_nmea_cb(struct gnss_global_data *pvt)
102
102
* @return nothing
103
103
*
104
104
*/
105
- void driver_cxd5605_resp_cb (struct cxd5605_data * drv_data ,
105
+ static void driver_cxd5605_resp_cb (struct cxd5605_data * drv_data ,
106
106
struct cxd5605_cmd_data * cxd5605_cmd_data ,
107
107
int cmd , int ret )
108
108
{
@@ -146,7 +146,7 @@ void driver_cxd5605_resp_cb(struct cxd5605_data *drv_data,
146
146
* @return returns an error (-ENODEV) if the i2c bus is not ready
147
147
*
148
148
*/
149
- int init (const struct device * dev )
149
+ static int init (const struct device * dev )
150
150
{
151
151
const struct cxd5605_config * cfg = dev -> config ;
152
152
struct cxd5605_data * drv_data = dev -> data ;
@@ -168,6 +168,8 @@ int init(const struct device *dev)
168
168
/* save this driver instance for passing to other functions */
169
169
drv_data -> cxd5605_dev = dev ;
170
170
171
+ result = gpio_pin_configure_dt (& cfg -> rst_gpio , GPIO_OUTPUT_HIGH );
172
+
171
173
return result ;
172
174
}
173
175
@@ -591,7 +593,7 @@ static int cxd5605_attr_set(const struct device *dev,
591
593
case SENSOR_ATTR_CXD5605_CALLBACK :
592
594
init (dev );
593
595
LOG_DBG ("Got CXD5605_ALERT_INTERRUPTS\n" );
594
- setup_interrupts (dev );
596
+ cxd5605_setup_interrupts (dev );
595
597
/* setup shim callbacks */
596
598
#ifdef DEBUG
597
599
printf ("[driver] register driver callback\n" );
@@ -630,7 +632,7 @@ static const struct sensor_driver_api cxd5605_driver_api = {
630
632
* @return 0 if successful, negative errno code if failure
631
633
*
632
634
*/
633
- int setup_interrupts (const struct device * dev )
635
+ int cxd5605_setup_interrupts (const struct device * dev )
634
636
{
635
637
int result ;
636
638
struct cxd5605_data * drv_data = dev -> data ;
@@ -681,7 +683,6 @@ static int cxd5605_driver_pm_action(const struct device *dev,
681
683
enum pm_device_action action )
682
684
{
683
685
const struct cxd5605_config * config = dev -> config ;
684
- const struct gpio_dt_spec * pwr_gpio = & config -> pwr_gpio ;
685
686
const struct gpio_dt_spec * rst_gpio = & config -> rst_gpio ;
686
687
687
688
int result = 0 ;
0 commit comments