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 3 patches:
1. corrects the data types
2. moves all headers to 1 file
3. sources are modified to make use of the newly created header file
Pavan Savoy (3):
drivers:staging:ti-st: set right the data types drivers:staging:ti-st: mv headers to ti_wilink_st drivers:staging:ti-st: use new ti_wilink_st header
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/3 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/3 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.
Also modify the structures to use cleaner u8/u16 types for data coming in from chip and data parsed out of firmware.
--- drivers/staging/ti-st/fm.h | 13 - drivers/staging/ti-st/st.h | 83 ------- drivers/staging/ti-st/st_core.h | 128 ----------- drivers/staging/ti-st/st_kim.h | 180 --------------- drivers/staging/ti-st/st_ll.h | 69 ------ drivers/staging/ti-st/ti_wilink_st.h | 409 ++++++++++++++++++++++++++++++++++ 6 files changed, 409 insertions(+), 473 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/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.h deleted +0 -128
128 lines not on this page · raw message
drivers/staging/ti-st/st_kim.h deleted +0 -180
180 lines not on this page · raw message
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
PATCH 3/3 drivers:staging:ti-st: use new ti_wilink_st header
From: Pavan Savoy <[email protected]>
modify the source files to include the new header ti_wilink_st.h, also modify the sources to include dependent headers so that inclusion of ti_wilink_st doesn't cause for compile errors/warnings.
--- drivers/staging/ti-st/bt_drv.c | 2 +- drivers/staging/ti-st/st_core.c | 10 +--------- drivers/staging/ti-st/st_kim.c | 5 +++-- drivers/staging/ti-st/st_ll.c | 4 +++- 4 files changed, 8 insertions(+), 13 deletions(-)
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/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_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_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 */
Signature · 1 line
1.6.5
Quoted 8 lines · On Thu, Sep 16, 2010 at 08:49:29PM -0400, [email protected] wrote:
From: Pavan Savoy <[email protected]>
Greg,
As suggested, the patch has been spilt to 3 patches:
1. corrects the data types
2. moves all headers to 1 file
3. sources are modified to make use of the newly created header file
Almost.
Never create a patch that breaks the build. Your patch #2 did that, right?
Care to merge number 2 and 3 together?
thanks,
greg k-h
Quoted 9 lines · On Thu, Sep 16, 2010 at 08:49:29PM -0400, [email protected] wrote:
From: Pavan Savoy <[email protected]>
Greg,
As suggested, the patch has been spilt to 3 patches:
1. corrects the data types
2. moves all headers to 1 file
3. sources are modified to make use of the newly created header file
Quoted 5 lines
Almost.
Never create a patch that breaks the build. Your patch #2 did that, right?
Care to merge number 2 and 3 together?
Yes, I did think of it, OK will send an update.
Quoted 2 lines
thanks,
greg k-h
Greg,
Quoted 8 lines
Quoted 7 lines
Greg,
As suggested, the patch has been spilt to 3 patches:
1. corrects the data types
2. moves all headers to 1 file
3. sources are modified to make use of the newly created header file
Quoted 7 lines
Quoted 5 lines
Almost.
Never create a patch that breaks the build. Your patch #2 did that, right?
Care to merge number 2 and 3 together?Yes, I did think of it, OK will send an update.
I've sent across the patches, please review and merge.
Quoted 2 lines
Quoted 2 lines
thanks,
greg k-h
Quoted 3 lines · Pavan
Greg,
I've sent across the patches, please review and merge.
Please give me a chance to have a life outside of patches. It was the weekend you know, and I do have this pesky thing called a "real job"...
Greg,
Quoted 8 lines
-----Original Message-----
From: Greg KH [mailto:[email protected]]
Sent: Monday, September 20, 2010 12:30 PM
To: Savoy, Pavan
Cc: [email protected]; [email protected]; linux- [email protected]
Subject: Re: [PATCH 0/3] prepare ti-st to mv out of staging
Quoted 7 lines
Quoted 3 lines · Pavan
Greg,
I've sent across the patches, please review and merge.
Please give me a chance to have a life outside of patches. It was the weekend you know, and I do have this pesky thing called a "real job"...
Oopsy, Ok, Apologize for all the pestering, probably a bit too eager to get it out of staging. Appreciate the reply though.
Thanks.