prepare ti-st to mv out of staging
cover prepare ti-st to mv out of staging
From: Pavan Savoy <[email protected]>
Greg,
As suggested, the patch has been spilt to 2 patches:
1. correction of the data types
2. moving headers to ti_wilink_st.h and source modifications for it
and application of individual patches doesn't break the build :)
Pavan Savoy (2):
drivers:staging:ti-st: set right the data types drivers:staging:ti-st: mv headers to ti_wilink_st
drivers/staging/ti-st/bt_drv.c | 2 +- drivers/staging/ti-st/fm.h | 13 - drivers/staging/ti-st/st.h | 83 ------- drivers/staging/ti-st/st_core.c | 10 +- drivers/staging/ti-st/st_core.h | 128 ----------- drivers/staging/ti-st/st_kim.c | 5 +- drivers/staging/ti-st/st_kim.h | 180 --------------- drivers/staging/ti-st/st_ll.c | 4 +- drivers/staging/ti-st/st_ll.h | 69 ------ drivers/staging/ti-st/ti_wilink_st.h | 409 ++++++++++++++++++++++++++++++++++ 10 files changed, 417 insertions(+), 486 deletions(-) delete mode 100644 drivers/staging/ti-st/fm.h delete mode 100644 drivers/staging/ti-st/st.h delete mode 100644 drivers/staging/ti-st/st_core.h delete mode 100644 drivers/staging/ti-st/st_kim.h delete mode 100644 drivers/staging/ti-st/st_ll.h create mode 100644 drivers/staging/ti-st/ti_wilink_st.h
PATCH 1/2 drivers:staging:ti-st: set right the data types
From: Pavan Savoy <[email protected]>
replace uint and family by a much more proper u8/u16 types. This is required specifically for data members of structures coming in from the chip and data members parsed from the binary firmware file.
--- drivers/staging/ti-st/fm.h | 6 +++--- drivers/staging/ti-st/st_kim.h | 36 ++++++++++++++++++------------------ 2 files changed, 21 insertions(+), 21 deletions(-)
drivers/staging/ti-st/fm.h +3 -3
@@ -1,5 +1,5 @@struct fm_event_hdr { -unsigned char plen; +u8 plen; } __attribute__ ((packed));#define FM_MAX_FRAME_SIZE 0xFF/* TODO: */
@@ -8,6 +8,6 @@ struct fm_event_hdr {/* gps stuff */ struct gps_event_hdr { -unsigned char opcode; -unsigned short plen; +u8 opcode; +u16 plen; } __attribute__ ((packed));
drivers/staging/ti-st/st_kim.h +18 -18
@@ -128,10 +128,10 @@ void kim_st_list_protocols(struct st_data_s *, void *);* relevant procedure to be called. */ struct bts_header { -uint32_t magic; -uint32_t version; -uint8_t future[24 ]; -uint8_t actions[0 ]; +u32 magic; +u32 version; +u8 future[24 ]; +u8 actions[0 ]; } __attribute__ ((packed));/**
@@ -139,28 +139,28 @@ struct bts_header {* data. */ struct bts_action { -uint16_t type; -uint16_t size; -uint8_t data[0 ]; +u16 type; +u16 size; +u8 data[0 ]; } __attribute__ ((packed));struct bts_action_send { -uint8_t data[0 ]; +u8 data[0 ]; } __attribute__ ((packed));struct bts_action_wait { -uint32_t msec; -uint32_t size; -uint8_t data[0 ]; +u32 msec; +u32 size; +u8 data[0 ]; } __attribute__ ((packed));struct bts_action_delay { -uint32_t msec; +u32 msec; } __attribute__ ((packed));struct bts_action_serial { -uint32_t baud; -uint32_t flow_control; +u32 baud; +u32 flow_control; } __attribute__ ((packed));/**
@@ -170,10 +170,10 @@ struct bts_action_serial {* when it receives request from KIM for ldisc installation. */ struct hci_command { -uint8_t prefix; -uint16_t opcode; -uint8_t plen; -uint32_t speed; +u8 prefix; +u16 opcode; +u8 plen; +u32 speed; } __attribute__ ((packed));
Signature · 1 line
1.6.5
PATCH 2/2 drivers:staging:ti-st: mv headers to ti_wilink_st
From: Pavan Savoy <[email protected]>
move all the header information to ti_wilink_st.h.
This header would then not only serve the local modules like the st_core.c, st_kim.c and st_ll.c but also the external modules/protocol drivers that are dependent on the shared transport driver.
Modify the source files to include the new header ti_wilink_st.h,
--- drivers/staging/ti-st/bt_drv.c | 2 +- drivers/staging/ti-st/fm.h | 13 - drivers/staging/ti-st/st.h | 83 ------- drivers/staging/ti-st/st_core.c | 10 +- drivers/staging/ti-st/st_core.h | 128 ----------- drivers/staging/ti-st/st_kim.c | 5 +- drivers/staging/ti-st/st_kim.h | 180 --------------- drivers/staging/ti-st/st_ll.c | 4 +- drivers/staging/ti-st/st_ll.h | 69 ------ drivers/staging/ti-st/ti_wilink_st.h | 409 ++++++++++++++++++++++++++++++++++ 10 files changed, 417 insertions(+), 486 deletions(-) delete mode 100644 drivers/staging/ti-st/fm.h delete mode 100644 drivers/staging/ti-st/st.h delete mode 100644 drivers/staging/ti-st/st_core.h delete mode 100644 drivers/staging/ti-st/st_kim.h delete mode 100644 drivers/staging/ti-st/st_ll.h create mode 100644 drivers/staging/ti-st/ti_wilink_st.h
drivers/staging/ti-st/bt_drv.c +1 -1
@@ -24,7 +24,7 @@#include <net/bluetooth/bluetooth.h> #include <net/bluetooth/hci_core.h> -#include "st.h" +#include "ti_wilink_st.h" #include "bt_drv.h" /* Define this macro to get debug msg */
drivers/staging/ti-st/fm.h deleted +0 -13
@@ -1,13 +0,0 @@ -struct fm_event_hdr { -u8 plen; -} __attribute__ ((packed)); - -#define FM_MAX_FRAME_SIZE 0xFF/* TODO: */ -#define FM_EVENT_HDR_SIZE 1/* size of fm_event_hdr */ -#define ST_FM_CH8_PKT 0x8 - -/* gps stuff */ -struct gps_event_hdr { -u8 opcode; -u16 plen; -} __attribute__ ((packed));
drivers/staging/ti-st/st.h deleted +0 -83
83 lines not on this page · raw message
drivers/staging/ti-st/st_core.c +1 -9
@@ -28,15 +28,7 @@#include <net/bluetooth/bluetooth.h> #include <net/bluetooth/hci_core.h> #include <net/bluetooth/hci.h> -#include "fm.h" -/* -* packet formats for fm and gps -* #include "gps.h" -*/ -#include "st_core.h" -#include "st_kim.h" -#include "st_ll.h" -#include "st.h" +#include "ti_wilink_st.h" /* strings to be used for rfkill entries and by * ST Core to be used for sysfs debug entry
drivers/staging/ti-st/st_core.h deleted +0 -128
128 lines not on this page · raw message
drivers/staging/ti-st/st_kim.c +3 -2
@@ -28,15 +28,16 @@#include <linux/gpio.h> #include <linux/debugfs.h> #include <linux/seq_file.h> -#include <linux/sched.h> +#include <linux/rfkill.h> -#include "st_kim.h" /* understand BT events for fw response */ #include <net/bluetooth/bluetooth.h> #include <net/bluetooth/hci_core.h> #include <net/bluetooth/hci.h> +#include "ti_wilink_st.h" +static int kim_probe (struct platform_device *pdev);static int kim_remove (struct platform_device *pdev);
drivers/staging/ti-st/st_kim.h deleted +0 -180
180 lines not on this page · raw message
drivers/staging/ti-st/st_ll.c +3 -1
@@ -19,7 +19,9 @@*/ #define pr_fmt (fmt) "(stll) :" fmt -#include "st_ll.h" +#include <linux/skbuff.h> +#include <linux/module.h> +#include "ti_wilink_st.h" /**********************************************************************/ /* internal functions */
drivers/staging/ti-st/st_ll.h deleted +0 -69
69 lines not on this page · raw message
drivers/staging/ti-st/ti_wilink_st.h new file +409 -0
409 lines not on this page · raw message
Signature · 1 line
1.6.5