drivers:staging:ti-st: patches
PATCH 1/1 drivers:staging:ti-st: patches
From: Pavan Savoy <[email protected]>
Greg,
There are 2 patch sets here,
1) fixes a problem - has only 1 patch
2) set of 3 patches subjected as RFCs
Please merge the patch below, and provide comments on the rest.
Pavan Savoy (1):
drivers:staging:ti-st: fix kim platform device id
drivers/staging/ti-st/st_kim.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)
Quoted 1 line
From
801919830d6d707f4171a28720b3f4cc5348e192Mon Sep 17 00:00:00 2001
From: Pavan Savoy <[email protected]>
Date: Fri, 10 Sep 2010 14:43:03 -0400
Subject: [RFC 0/3] *** SUBJECT HERE ***
*** BLURB HERE ***
Pavan Savoy (3):
drivers:staging:ti-st: mv headers to ti_wilink_st drivers:staging:ti-st: mv ti_wilink_st to include/ include:linux: make ti_wilink_st like the rest
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 | 12 +- drivers/staging/ti-st/st_core.h | 128 ------------ drivers/staging/ti-st/st_kim.c | 8 +- drivers/staging/ti-st/st_kim.h | 180 ----------------- drivers/staging/ti-st/st_ll.c | 6 +- drivers/staging/ti-st/st_ll.h | 69 ------- include/linux/ti_wilink_st.h | 411 +++++++++++++++++++++++++++++++++++++++ 10 files changed, 421 insertions(+), 491 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 include/linux/ti_wilink_st.h
PATCH 1/1 drivers:staging:ti-st: fix kim platform device id
From: Pavan Savoy <[email protected]>
Platform devices tend to have id as -1 when only 1 device exist and a value >=0 when multiple devices exist, since we plan to store all these platform devices if multiple exist, there was a requirement to have id to be >=0.
The patch fixes this problem.
--- drivers/staging/ti-st/st_kim.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)
drivers/staging/ti-st/st_kim.c +8 -1
@@ -638,7 +638,14 @@ static int kim_probe(struct platform_device *pdev)long *gpios = pdev->dev.platform_data;struct kim_data_s *kim_gdata; - st_kim_devices[pdev->id] = pdev; +if ((pdev->id !=-1 ) && (pdev->id <MAX_ST_DEVICES )) { +/* multiple devices could exist */ + st_kim_devices[pdev->id] = pdev; + }else { +/* platform's sure about existance of 1 device */ + st_kim_devices[0 ] = pdev; + } + kim_gdata =kzalloc (sizeof (struct kim_data_s ),GFP_ATOMIC );if (!kim_gdata) {pr_err ("no mem to allocate" );
Signature · 1 line
1.6.5
RFC 1/3 drivers:staging:ti-st: mv headers to ti_wilink_st
From: Pavan Savoy <[email protected]>
Move all headers to st.h and rename st.h to be ti_wilink_st.h, prepare the file to be moved to include/linux/ directory.
--- drivers/staging/ti-st/fm.h | 13 -- drivers/staging/ti-st/st.h | 318 +++++++++++++++++++++++++++++++++++++++ drivers/staging/ti-st/st_core.c | 8 - drivers/staging/ti-st/st_core.h | 128 ---------------- drivers/staging/ti-st/st_kim.c | 6 +- drivers/staging/ti-st/st_kim.h | 180 ---------------------- drivers/staging/ti-st/st_ll.c | 2 +- drivers/staging/ti-st/st_ll.h | 69 --------- 8 files changed, 321 insertions(+), 403 deletions(-) delete mode 100644 drivers/staging/ti-st/fm.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
drivers/staging/ti-st/fm.h deleted +0 -13
@@ -1,13 +0,0 @@ -struct fm_event_hdr { -unsigned char 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 { -unsigned char opcode; -unsigned short plen; -} __attribute__ ((packed));
drivers/staging/ti-st/st.h +318 -0
322 lines not on this page · raw message
drivers/staging/ti-st/st_core.c +0 -8
@@ -28,14 +28,6 @@#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" /* strings to be used for rfkill entries and by
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 +2 -4
@@ -28,15 +28,13 @@#include <linux/gpio.h> #include <linux/debugfs.h> #include <linux/seq_file.h> -#include <linux/sched.h> - -#include "st_kim.h" +#include <linux/rfkill.h> /* understand BT events for fw response */ #include <net/bluetooth/bluetooth.h> #include <net/bluetooth/hci_core.h> #include <net/bluetooth/hci.h> - +#include "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 +1 -1
@@ -19,7 +19,7 @@*/ #define pr_fmt (fmt) "(stll) :" fmt -#include "st_ll.h" +#include "st.h" /**********************************************************************/ /* internal functions */
drivers/staging/ti-st/st_ll.h deleted +0 -69
69 lines not on this page · raw message
Signature · 1 line
1.6.5
RFC 2/3 drivers:staging:ti-st: mv ti_wilink_st to include/
From: Pavan Savoy <[email protected]>
Move the ti_wilink_st header (previously st.h) to include/linux directory. This header is to be included by all protocol drivers viz' bluetooth drivers, FM V4L2 and GPS generic character device driver. It also serves the core shared transport driver.
--- drivers/staging/ti-st/bt_drv.c | 2 +- drivers/staging/ti-st/st.h | 401 -------------------------------------- drivers/staging/ti-st/st_core.c | 4 +- drivers/staging/ti-st/st_kim.c | 4 +- drivers/staging/ti-st/st_ll.c | 4 +- include/linux/ti_wilink_st.h | 404 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 411 insertions(+), 408 deletions(-) delete mode 100644 drivers/staging/ti-st/st.h create mode 100644 include/linux/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 <linux/ti_wilink_st.h> #include "bt_drv.h" /* Define this macro to get debug msg */
drivers/staging/ti-st/st.h deleted +0 -401
401 lines not on this page · raw message
drivers/staging/ti-st/st_core.c +2 -2
@@ -1,7 +1,7 @@/* * Shared Transport Line discipline driver Core * This hooks up ST KIM driver and ST LL driver -* Copyright (C) 2009 Texas Instruments +* Copyright (C) 2009-2010 Texas Instruments * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as
@@ -28,7 +28,7 @@#include <net/bluetooth/bluetooth.h> #include <net/bluetooth/hci_core.h> #include <net/bluetooth/hci.h> -#include "st.h" +#include <linux/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 +2 -2
@@ -2,7 +2,7 @@* Shared Transport Line discipline driver Core * Init Manager module responsible for GPIO control * and firmware download -* Copyright (C) 2009 Texas Instruments +* Copyright (C) 2009-2010 Texas Instruments * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as
@@ -34,7 +34,7 @@#include <net/bluetooth/bluetooth.h> #include <net/bluetooth/hci_core.h> #include <net/bluetooth/hci.h> -#include "st.h" +#include <linux/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 +2 -2
@@ -1,7 +1,7 @@/* * Shared Transport driver * HCI-LL module responsible for TI proprietary HCI_LL protocol -* Copyright (C) 2009 Texas Instruments +* Copyright (C) 2009-2010 Texas Instruments * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as
@@ -19,7 +19,7 @@*/ #define pr_fmt (fmt) "(stll) :" fmt -#include "st.h" +#include <linux/ti_wilink_st.h> /**********************************************************************/ /* internal functions */
include/linux/ti_wilink_st.h new file +404 -0
404 lines not on this page · raw message
Signature · 1 line
1.6.5
RFC 3/3 include:linux: make ti_wilink_st like the rest
From: Pavan Savoy <[email protected]>
ti_wilink_st.h now is similar to other headers in include/linux. The st_ll dependency on ti_wilink_st is also fixed.
--- drivers/staging/ti-st/st_ll.c | 2 + include/linux/ti_wilink_st.h | 51 +++++++++++++++++++++++----------------- 2 files changed, 31 insertions(+), 22 deletions(-)
drivers/staging/ti-st/st_ll.c +2 -0
@@ -19,6 +19,8 @@*/ #define pr_fmt (fmt) "(stll) :" fmt +#include <linux/module.h> +#include <linux/skbuff.h> #include <linux/ti_wilink_st.h> /**********************************************************************/
include/linux/ti_wilink_st.h +29 -22
103 lines not on this page · raw message
Signature · 1 line
1.6.5
Re: [RFC 3/3] include:linux: make ti_wilink_st like the rest
Quoted 16 lines · On Fri, Sep 10, 2010 at 03:58:58PM -0400, [email protected] wrote:
From: Pavan Savoy <[email protected]>
ti_wilink_st.hnow is similar to other headers ininclude/linux. Thest_lldependency onti_wilink_stis also fixed.Signed-off-by Pavan Savoy <[email protected]>--- drivers/staging/ti-st/st_ll.c | 2 + include/linux/ti_wilink_st.h | 51 +++++++++++++++++++++++----------------- 2 files changed, 31 insertions(+), 22 deletions(-)drivers/staging/ti-st/st_ll.c +0
-0
drivers/staging/ti-st/st_ll.c line 23
Quoted 5 lines
drivers/staging/ti-st/st_ll.c +2
-0@@ -19,6 +19,8 @@*/ #define pr_fmt (fmt) "(stll) :" fmt +#include <linux/module.h> +#include <linux/skbuff.h>
Why is this needed? Does it fix something that broke in patch 2/3? If so, fix it in that patch please.
Quoted 8 lines
drivers/staging/ti-st/st_ll.c +0
-0#include <linux/ti_wilink_st.h> /**********************************************************************/ include/linux/ti_wilink_st.h +0
-0
include/linux/ti_wilink_st.h line 33
Quoted 9 lines
include/linux/ti_wilink_st.h +5
-1@@ -26,12 +26,18 @@#ifndef ST_H #define ST_H -#include <linux/skbuff.h> +#ifdef __KERNEL__ +#include <linux/skbuff.h> /* for sk_buff */ +#include <linux/rfkill.h> /* for rfkill */ +#include <linux/tty.h> /* for tty_struct */ +#include <linux/tty_ldisc.h> /* for tty_ldisc_ops */
Are these really needed? Can't you include them in the .c files that need to include this .h file instead?
include/linux/ti_wilink_st.h line 35
Quoted 2 lines
include/linux/ti_wilink_st.h +2
-0+ +#endif
I don't think you need this #ifdef, do you? Are you really exporting this file to userspace for some reason? If so, what reason?
include/linux/ti_wilink_st.h line 40
Quoted 6 lines
include/linux/ti_wilink_st.h +1
-1/* TODO: * Move the following to tty.h upon acceptance */ -#define N_TI_WL 20/* Ldisc for TI's WL BT, FM, GPS combo chips */ +#define N_TI_WL 22/* Ldisc for TI's WL BT, FM, GPS combo chips */
Why did this change?
Quoted 5 lines
include/linux/ti_wilink_st.h +0
-0/** * enum kim_gpio_state - Few protocols such as FM have ACTIVE LOW @@ -292,10 +298,10 @@ void kim_st_list_protocols(struct st_data_s *, void *);* relevant procedure to be called.
include/linux/ti_wilink_st.h void kim_st_list_protocols(struct st_data_s *, void *); · line 304
Quoted 10 lines
include/linux/ti_wilink_st.h +4
-4*/ struct bts_header { -uint32_t magic; -uint32_t version; -uint8_t future[24 ]; -uint8_t actions[0 ]; +unsigned long magic; +unsigned long version; +unsigned char future[24 ]; +unsigned char actions[0 ];
Why change these now? That should happen some other place in the series, not here. Especially as you don't mention anything like this in the changelog comment.
Also, why not just use 'u8' and friends instead? That's the "proper" kernel types to be using, not the uint8_t mess that is not correct kernel types.
include/linux/ti_wilink_st.h void st_ll_wakeup(struct st_data_s *); · line 398
Quoted 8 lines
include/linux/ti_wilink_st.h +1
-0@@ -386,6 +392,7 @@ void st_ll_wakeup(struct st_data_s *);/** * structures and declarations used by the st_core for FM packets +* and GPS packets */ struct fm_event_hdr {unsigned char plen;
Oh, is it? That should go somewhere else.
include/linux/ti_wilink_st.h struct fm_event_hdr { · line 409
Quoted 9 lines
include/linux/ti_wilink_st.h +2
-2@@ -397,8 +404,8 @@ struct fm_event_hdr {/* gps stuff */ struct gps_event_hdr { -unsigned char opcode; -unsigned short plen; +unsigned char opcode; +unsigned short plen; } __attribute__ ((packed));
This should be done somewhere else, it's a formatting patch.
include/linux/ti_wilink_st.h struct fm_event_hdr { · line 411
Quoted 2 lines
include/linux/ti_wilink_st.h +0
-0#endif /* ST_H */
I don't think this file is called "ST_H" here anymore.
thanks,
greg k-h
RE: [RFC 3/3] include:linux: make ti_wilink_st like the rest
Greg,
Quoted 28 lines
-----Original Message-----
From: Greg KH [mailto:[email protected]]
Sent: Thursday, September 16, 2010 3:01 PM
To: Savoy, Pavan
Cc: [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [RFC 3/3] include:linux: maketi_wilink_stlike the restQuoted 9 lines · On Fri, Sep 10, 2010 at 03:58:58PM -0400, [email protected] wrote:
From: Pavan Savoy <[email protected]>
ti_wilink_st.hnow is similar to other headers ininclude/linux. Thest_lldependency onti_wilink_stis also fixed.Signed-off-by Pavan Savoy <[email protected]>--- drivers/staging/ti-st/st_ll.c | 2 + include/linux/ti_wilink_st.h | 51 +++++++++++++++++++++++-----------------
Quoted 9 lines
2 files changed, 31 insertions(+), 22 deletions(-)drivers/staging/ti-st/st_ll.c +0
-0@@ -19,6 +19,8 @@*/
Quoted 6 lines
drivers/staging/ti-st/st_ll.c line 23
Quoted 3 lines
drivers/staging/ti-st/st_ll.c +2
-0#define pr_fmt (fmt) "(stll) :" fmt +#include <linux/module.h> +#include <linux/skbuff.h> Why is this needed? Does it fix something that broke in patch 2/3? If so, fix it in that patch please.
Hnm, I don't think they are needed. Must be a mistake will correct it.
Quoted 11 lines
Quoted 11 lines
drivers/staging/ti-st/st_ll.c +0
-0#include <linux/ti_wilink_st.h> /**********************************************************************/ include/linux/ti_wilink_st.h +0
-0@@ -26,12 +26,18 @@#ifndef ST_H #define ST_H
Quoted 9 lines
include/linux/ti_wilink_st.h line 33
Quoted 6 lines
include/linux/ti_wilink_st.h +5
-1-#include <linux/skbuff.h> +#ifdef __KERNEL__ +#include <linux/skbuff.h> /* for sk_buff */ +#include <linux/rfkill.h> /* for rfkill */ +#include <linux/tty.h> /* for tty_struct */ +#include <linux/tty_ldisc.h> /* for tty_ldisc_ops */ Are these really needed? Can't you include them in the .c files that need to include this .h file instead?
Yes, that was the idea, but then just including these without including the headers here, we get tons of errors, although it shouldn't happen. Had a look at other headers which sort of did something similar.
Quoted 5 lines
include/linux/ti_wilink_st.h line 35
Quoted 2 lines
include/linux/ti_wilink_st.h +2
-0+ +#endif I don't think you need this #ifdef, do you? Are you really exporting this file to userspace for some reason? If so, what reason?
For line discipline number only.
There will be a user-space daemon which when requested (via rfkill) opens the UART, sets the baud-rate to both local and chip side and installs the line discipline.
Quoted 8 lines
include/linux/ti_wilink_st.h line 40
Quoted 6 lines
include/linux/ti_wilink_st.h +1
-1/* TODO: * Move the following to tty.h upon acceptance */ -#define N_TI_WL 20/* Ldisc for TI's WL BT, FM, GPS combo chips */ +#define N_TI_WL 22/* Ldisc for TI's WL BT, FM, GPS combo chips */ Why did this change?
Yes the number of line disciplines has grown since I last submitted a patch :)
Quoted 21 lines
include/linux/ti_wilink_st.h void kim_st_list_protocols(struct st_data_s *, void
Quoted 4 lines
include/linux/ti_wilink_st.h +0
-0/** * enum kim_gpio_state - Few protocols such as FM have ACTIVE LOW @@ -292,10 +298,10 @@ void kim_st_list_protocols(struct st_data_s *, void*);
include/linux/ti_wilink_st.h void kim_st_list_protocols(struct st_data_s *, void *); · line 304
Quoted 11 lines
include/linux/ti_wilink_st.h +4
-4* relevant procedure to be called. */ struct bts_header { -uint32_t magic; -uint32_t version; -uint8_t future[24 ]; -uint8_t actions[0 ]; +unsigned long magic; +unsigned long version; +unsigned char future[24 ]; +unsigned char actions[0 ];Why change these now? That should happen some other place in the series, not here. Especially as you don't mention anything like this in the changelog comment.
Quoted 3 lines
Also, why not just use 'u8' and friends instead? That's the "proper" kernel types to be using, not the
uint8_tmess that is not correct kernel types.
Yes a mistake here too.
This should have been in the patch where I plan to combine all the headers into 1 header and have it in include/linux/ [the headers like st_core.h, st_kim.h, st_ll.h, bt_drv.h and fm and GPs headers]
Yes, and the Bluetooth driver to go into drivers/Bluetooth/ and ST driver (st_core.c/st_kim.c and st_ll.c) to go into drivers/char/ And the upcoming FM V4L2 to go into the drivers/media/radio/
Does this sound fine?
Quoted 10 lines
include/linux/ti_wilink_st.h void st_ll_wakeup(struct st_data_s *); · line 398
Quoted 8 lines
include/linux/ti_wilink_st.h +1
-0@@ -386,6 +392,7 @@ void st_ll_wakeup(struct st_data_s *);/** * structures and declarations used by the st_core for FM packets +* and GPS packets */ struct fm_event_hdr {unsigned char plen;Oh, is it? That should go somewhere else.
Plan is to have just 1 large header to be included by all protocol drivers (BT, FM and GPS)... Is it a bad idea?
Quoted 11 lines
include/linux/ti_wilink_st.h struct fm_event_hdr { · line 409
Quoted 9 lines
include/linux/ti_wilink_st.h +2
-2@@ -397,8 +404,8 @@ struct fm_event_hdr {/* gps stuff */ struct gps_event_hdr { -unsigned char opcode; -unsigned short plen; +unsigned char opcode; +unsigned short plen; } __attribute__ ((packed));This should be done somewhere else, it's a formatting patch.
Yes, I'll do it in another patch.
Quoted 4 lines
include/linux/ti_wilink_st.h struct fm_event_hdr { · line 411
Quoted 2 lines
include/linux/ti_wilink_st.h +0
-0#endif /* ST_H */ I don't think this file is called "
ST_H" here anymore.
Yes, need your input here. This file will be made use by the rest of the protocol drivers I plan to push patches for. So does ti_wilink_st.h sound fine? And in include/linux? So that rest of the drivers can be in their individual directories.
Thanks,
Pavan
Quoted 3 lines
thanks,
greg k-h
Re: [RFC 3/3] include:linux: make ti_wilink_st like the rest
Quoted 8 lines · Pavan
Quoted 3 lines
Also, why not just use 'u8' and friends instead? That's the "proper" kernel types to be using, not the
uint8_tmess that is not correct kernel types.Yes a mistake here too.
This should have been in the patch where I plan to combine all the headers into 1 header and have it ininclude/linux/[the headers likest_core.h,st_kim.h,st_ll.h,bt_drv.hand fm and GPs headers]
Quoted 5 lines
Yes, and the Bluetooth driver to go into
drivers/Bluetooth/and ST driver (st_core.c/st_kim.candst_ll.c) to go intodrivers/char/And the upcoming FM V4L2 to go into thedrivers/media/radio/Does this sound fine?
Yes.
Quoted 11 lines
Quoted 10 lines
include/linux/ti_wilink_st.h void st_ll_wakeup(struct st_data_s *); · line 398
Quoted 8 lines
include/linux/ti_wilink_st.h +1
-0@@ -386,6 +392,7 @@ void st_ll_wakeup(struct st_data_s *);/** * structures and declarations used by the st_core for FM packets +* and GPS packets */ struct fm_event_hdr {unsigned char plen;Oh, is it? That should go somewhere else.
Quoted 2 lines
Plan is to have just 1 large header to be included by all protocol drivers (BT, FM and GPS)... Is it a bad idea?
No, as long as all drivers need it.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
#endif /*
ST_H*/I don't think this file is called "
ST_H" here anymore.Yes, need your input here. This file will be made use by the rest of the protocol drivers I plan to push patches for.
So doesti_wilink_st.hsound fine? And ininclude/linux? So that rest of the drivers can be in their individual directories.
Yes, that name is fine, but it needs to be the same as the #ifdef guard as well.
thanks,
greg k-h
RE: [RFC 3/3] include:linux: make ti_wilink_st like the rest
Greg,
Quoted 48 lines
-----Original Message-----
From: Greg KH [mailto:[email protected]]
Sent: Thursday, September 16, 2010 3:59 PM
To: Savoy, Pavan
Cc: [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [RFC 3/3] include:linux: maketi_wilink_stlike the restQuoted 6 lines · Pavan
Quoted 3 lines
Also, why not just use 'u8' and friends instead? That's the "proper" kernel types to be using, not the
uint8_tmess that is not correct kernel types.Yes a mistake here too.
This should have been in the patch where I plan to combine all the headersinto 1 header and have it in
include/linux/Quoted 1 line
[the headers like
st_core.h,st_kim.h,st_ll.h,bt_drv.hand fm and GPsheaders]
Quoted 6 lines
Yes, and the Bluetooth driver to go into
drivers/Bluetooth/and ST driver (st_core.c/st_kim.candst_ll.c) to go intodrivers/char/And the upcoming FM V4L2 to go into thedrivers/media/radio/Does this sound fine?
Yes.
Quoted 11 lines
Quoted 10 lines
include/linux/ti_wilink_st.h void st_ll_wakeup(struct st_data_s *); · line 398
Quoted 8 lines
include/linux/ti_wilink_st.h +1
-0@@ -386,6 +392,7 @@ void st_ll_wakeup(struct st_data_s *);/** * structures and declarations used by the st_core for FM packets +* and GPS packets */ struct fm_event_hdr {unsigned char plen;Oh, is it? That should go somewhere else.
Quoted 1 line
Plan is to have just 1 large header to be included by all protocol drivers
(BT, FM and GPS)...
Quoted 1 line
Is it a bad idea?
No, as long as all drivers need it.
Quoted 4 lines
Quoted 3 lines
Quoted 1 line
#endif /*
ST_H*/I don't think this file is called "
ST_H" here anymore.
Quoted 7 lines
Quoted 4 lines
Yes, need your input here. This file will be made use by the rest of the protocol drivers I plan to push patches for.
So doesti_wilink_st.hsound fine? And ininclude/linux? So that rest of the drivers can be in their individual directories.Yes, that name is fine, but it needs to be the same as the #ifdef guard as well.
I've re-worked on the patch;
I hope now it's close to ready to be in include/linux/?
Quoted 3 lines
thanks,
greg k-h
Re: [RFC 2/3] drivers:staging:ti-st: mv ti_wilink_st to include/
In reply to [email protected]Quoted 6 lines · On Fri, Sep 10, 2010 at 03:58:57PM -0400, [email protected] wrote:
From: Pavan Savoy <[email protected]>
Move the
ti_wilink_stheader (previouslyst.h) toinclude/linuxdirectory. This header is to be included by all protocol drivers viz' bluetooth drivers, FM V4L2 and GPS generic character device driver. It also serves the core shared transport driver.
Ah, so the individual drivers will be in the different parts of the kernel? Like drivers/char and other places? That makes sense why they should be using a file in include/linux/
But just make the file that name now, in the staging directory. That way when we move the code out, it's easier to do so (we don't have to do this 3 patch series.)
thanks,
greg k-h
Re: [RFC 1/3] drivers:staging:ti-st: mv headers to ti_wilink_st
In reply to [email protected]Quoted 4 lines · On Fri, Sep 10, 2010 at 03:58:56PM -0400, [email protected] wrote:
From: Pavan Savoy <[email protected]>
Move all headers to
st.hand renamest.hto beti_wilink_st.h, prepare the file to be moved toinclude/linux/directory.
Why does the file need to be in include/linux/ at all? Can't it just live in the same directory as the drivers?
And this patch doesn't rename st.h to be anything else.
thanks,
greg k-h
RE: [PATCH] drivers:staging:ti-st: fix kim platform device id
In reply to [email protected]Greg,
----------------
Thanks & Regards,
Pavan Savoy | x0099669
Quoted 7 lines
-----Original Message-----
From: Savoy, Pavan
Sent: Friday, September 10, 2010 2:59 PM
To: [email protected]; [email protected]
Cc: [email protected]; [email protected]; Savoy, Pavan
Subject: [PATCH] drivers:staging:ti-st: fix kim platform device id
Quoted 7 lines
From: Pavan Savoy <[email protected]>
Platform devices tend to have id as -1 when only 1 device exist and a value >=0 when multiple devices exist, since we plan to store all these platform devices if multiple exist, there was a requirement to have id to be >=0.
The patch fixes this problem.
Please merge this patch, and I hope you find some time to review the rest of them.
Quoted 27 lines
Signed-off-by Pavan Savoy <[email protected]>--- drivers/staging/ti-st/st_kim.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)drivers/staging/ti-st/st_kim.c +8
-2@@ -638,7 +638,14 @@ static int kim_probe(struct platform_device *pdev)long *gpios = pdev->dev.platform_data;struct kim_data_s *kim_gdata; - st_kim_devices[pdev->id] = pdev; +if ((pdev->id !=-1 ) && (pdev->id <MAX_ST_DEVICES )) { +/* multiple devices could exist */ + st_kim_devices[pdev->id] = pdev; + }else { +/* platform's sure about existance of 1 device */ + st_kim_devices[0 ] = pdev; + } + kim_gdata =kzalloc (sizeof (struct kim_data_s ),GFP_ATOMIC );if (!kim_gdata) {pr_err ("no mem to allocate" ); --1.6.5
RE: [PATCH] drivers:staging:ti-st: fix kim platform device id
In reply to [email protected]Greg,
Any updates?
Please ... Please find some time to have a look at it!!
Alan,
Please have a look at it too. I've dealt with most of the comments, device context has been provided, spin-locks have been reviewed and documented multiple devices also can be easily supported if required.
Quoted 60 lines
-----Original Message-----
From: Savoy, Pavan
Sent: Monday, September 13, 2010 5:02 PM
To: [email protected]; [email protected]
Cc: [email protected]; [email protected]
Subject: RE: [PATCH] drivers:staging:ti-st: fix kim platform device idGreg,
----------------
Thanks & Regards,
Pavan Savoy | x0099669Quoted 7 lines
-----Original Message-----
From: Savoy, Pavan
Sent: Friday, September 10, 2010 2:59 PM
To: [email protected]; [email protected]
Cc: [email protected]; [email protected]; Savoy, Pavan
Subject: [PATCH] drivers:staging:ti-st: fix kim platform device idQuoted 7 lines
From: Pavan Savoy <[email protected]>
Platform devices tend to have id as -1 when only 1 device exist and a value >=0 when multiple devices exist, since we plan to store all these platform devices if multiple exist, there was a requirement to have id to be >=0.
The patch fixes this problem.Please merge this patch, and I hope you find some time to review the rest of them.
Quoted 27 lines
Signed-off-by Pavan Savoy <[email protected]>--- drivers/staging/ti-st/st_kim.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)drivers/staging/ti-st/st_kim.c +8
-2@@ -638,7 +638,14 @@ static int kim_probe(struct platform_device *pdev)long *gpios = pdev->dev.platform_data;struct kim_data_s *kim_gdata; - st_kim_devices[pdev->id] = pdev; +if ((pdev->id !=-1 ) && (pdev->id <MAX_ST_DEVICES )) { +/* multiple devices could exist */ + st_kim_devices[pdev->id] = pdev; + }else { +/* platform's sure about existance of 1 device */ + st_kim_devices[0 ] = pdev; + } + kim_gdata =kzalloc (sizeof (struct kim_data_s ),GFP_ATOMIC );if (!kim_gdata) {pr_err ("no mem to allocate" ); --1.6.5