* [PATCH 1/4] spi: butterfly: remove multiple blank lines
@ 2015-12-02 13:47 Sudip Mukherjee
2015-12-02 13:47 ` [PATCH 2/4] spi: butterfly: remove cast to void Sudip Mukherjee
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Sudip Mukherjee @ 2015-12-02 13:47 UTC (permalink / raw)
To: Mark Brown
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-spi-u79uwXL29TY76Z2rM5mHXA, Sudip Mukherjee
checkpatch complains about multiple blank lines.
Signed-off-by: Sudip Mukherjee <sudip-ofJRbWXBVFamYgehrs7/Lw@public.gmane.org>
---
drivers/spi/spi-butterfly.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/drivers/spi/spi-butterfly.c b/drivers/spi/spi-butterfly.c
index 9a95862..f520eaa 100644
--- a/drivers/spi/spi-butterfly.c
+++ b/drivers/spi/spi-butterfly.c
@@ -27,7 +27,6 @@
#include <linux/mtd/partitions.h>
-
/*
* This uses SPI to talk with an "AVR Butterfly", which is a $US20 card
* with a battery powered AVR microcontroller and lots of goodies. You
@@ -37,7 +36,6 @@
* and use this custom parallel port cable.
*/
-
/* DATA output bits (pins 2..9 == D0..D7) */
#define butterfly_nreset (1 << 1) /* pin 3 */
@@ -52,14 +50,11 @@
/* CONTROL output bits */
#define spi_cs_bit PARPORT_CONTROL_SELECT /* pin 17 */
-
-
static inline struct butterfly *spidev_to_pp(struct spi_device *spi)
{
return spi->controller_data;
}
-
struct butterfly {
/* REVISIT ... for now, this must be first */
struct spi_bitbang bitbang;
@@ -140,7 +135,6 @@ static void butterfly_chipselect(struct spi_device *spi, int value)
parport_frob_control(pp->port, spi_cs_bit, value ? spi_cs_bit : 0);
}
-
/* we only needed to implement one mode here, and choose SPI_MODE_0 */
#define spidelay(X) do { } while (0)
@@ -186,7 +180,6 @@ static struct flash_platform_data flash = {
.nr_parts = ARRAY_SIZE(partitions),
};
-
/* REVISIT remove this ugly global and its "only one" limitation */
static struct butterfly *butterfly;
@@ -262,7 +255,6 @@ static void butterfly_attach(struct parport *p)
parport_write_data(pp->port, pp->lastbyte);
msleep(100);
-
/*
* Start SPI ... for now, hide that we're two physical busses.
*/
@@ -334,7 +326,6 @@ static struct parport_driver butterfly_driver = {
.detach = butterfly_detach,
};
-
static int __init butterfly_init(void)
{
return parport_register_driver(&butterfly_driver);
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/4] spi: butterfly: remove cast to void
2015-12-02 13:47 [PATCH 1/4] spi: butterfly: remove multiple blank lines Sudip Mukherjee
@ 2015-12-02 13:47 ` Sudip Mukherjee
[not found] ` <1449064071-4915-2-git-send-email-sudipm.mukherjee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-12-02 13:47 ` [PATCH 3/4] spi: butterfly: correct alignment Sudip Mukherjee
[not found] ` <1449064071-4915-1-git-send-email-sudipm.mukherjee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2 siblings, 1 reply; 8+ messages in thread
From: Sudip Mukherjee @ 2015-12-02 13:47 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-kernel, linux-spi, Sudip Mukherjee
checkpatch was complaining about space after cast. But the cast to void
is not required at that place.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
drivers/spi/spi-butterfly.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/spi-butterfly.c b/drivers/spi/spi-butterfly.c
index f520eaa..8fc284d 100644
--- a/drivers/spi/spi-butterfly.c
+++ b/drivers/spi/spi-butterfly.c
@@ -289,7 +289,7 @@ clean2:
clean1:
parport_unregister_device(pd);
clean0:
- (void) spi_master_put(pp->bitbang.master);
+ spi_master_put(pp->bitbang.master);
done:
pr_debug("%s: butterfly probe, fail %d\n", p->name, status);
}
@@ -317,7 +317,7 @@ static void butterfly_detach(struct parport *p)
parport_release(pp->pd);
parport_unregister_device(pp->pd);
- (void) spi_master_put(pp->bitbang.master);
+ spi_master_put(pp->bitbang.master);
}
static struct parport_driver butterfly_driver = {
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/4] spi: butterfly: correct alignment
2015-12-02 13:47 [PATCH 1/4] spi: butterfly: remove multiple blank lines Sudip Mukherjee
2015-12-02 13:47 ` [PATCH 2/4] spi: butterfly: remove cast to void Sudip Mukherjee
@ 2015-12-02 13:47 ` Sudip Mukherjee
[not found] ` <1449064071-4915-3-git-send-email-sudipm.mukherjee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
[not found] ` <1449064071-4915-1-git-send-email-sudipm.mukherjee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2 siblings, 1 reply; 8+ messages in thread
From: Sudip Mukherjee @ 2015-12-02 13:47 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-kernel, linux-spi, Sudip Mukherjee
checkpatch complains about the allignment with open parenthesis.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
drivers/spi/spi-butterfly.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/spi/spi-butterfly.c b/drivers/spi/spi-butterfly.c
index 8fc284d..f16ef7f 100644
--- a/drivers/spi/spi-butterfly.c
+++ b/drivers/spi/spi-butterfly.c
@@ -143,9 +143,8 @@ static void butterfly_chipselect(struct spi_device *spi, int value)
#include "spi-bitbang-txrx.h"
static u32
-butterfly_txrx_word_mode0(struct spi_device *spi,
- unsigned nsecs,
- u32 word, u8 bits)
+butterfly_txrx_word_mode0(struct spi_device *spi, unsigned nsecs, u32 word,
+ u8 bits)
{
return bitbang_txrx_be_cpha0(spi, nsecs, 0, 0, word, bits);
}
@@ -223,8 +222,8 @@ static void butterfly_attach(struct parport *p)
*/
pp->port = p;
pd = parport_register_device(p, "spi_butterfly",
- NULL, NULL, NULL,
- 0 /* FLAGS */, pp);
+ NULL, NULL, NULL,
+ 0 /* FLAGS */, pp);
if (!pd) {
status = -ENOMEM;
goto clean0;
@@ -275,7 +274,7 @@ static void butterfly_attach(struct parport *p)
pp->dataflash = spi_new_device(pp->bitbang.master, &pp->info[0]);
if (pp->dataflash)
pr_debug("%s: dataflash at %s\n", p->name,
- dev_name(&pp->dataflash->dev));
+ dev_name(&pp->dataflash->dev));
pr_info("%s: AVR Butterfly\n", p->name);
butterfly = pp;
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/4] spi: butterfly: use new parport device model
[not found] ` <1449064071-4915-1-git-send-email-sudipm.mukherjee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2015-12-02 13:47 ` Sudip Mukherjee
[not found] ` <1449064071-4915-4-git-send-email-sudipm.mukherjee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-12-02 20:11 ` Applied "spi: butterfly: remove multiple blank lines" " Mark Brown
1 sibling, 1 reply; 8+ messages in thread
From: Sudip Mukherjee @ 2015-12-02 13:47 UTC (permalink / raw)
To: Mark Brown
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-spi-u79uwXL29TY76Z2rM5mHXA, Sudip Mukherjee
Modify spi-butterfly driver to use the new parallel port device model.
Signed-off-by: Sudip Mukherjee <sudip-ofJRbWXBVFamYgehrs7/Lw@public.gmane.org>
---
Only change is in the module loading part. It has been tested by
inserting and removing the module repeatedly, tested with unbind also.
drivers/spi/spi-butterfly.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/spi/spi-butterfly.c b/drivers/spi/spi-butterfly.c
index f16ef7f..22a31e4 100644
--- a/drivers/spi/spi-butterfly.c
+++ b/drivers/spi/spi-butterfly.c
@@ -189,6 +189,7 @@ static void butterfly_attach(struct parport *p)
struct butterfly *pp;
struct spi_master *master;
struct device *dev = p->physport->dev;
+ struct pardev_cb butterfly_cb;
if (butterfly || !dev)
return;
@@ -221,9 +222,9 @@ static void butterfly_attach(struct parport *p)
* parport hookup
*/
pp->port = p;
- pd = parport_register_device(p, "spi_butterfly",
- NULL, NULL, NULL,
- 0 /* FLAGS */, pp);
+ memset(&butterfly_cb, 0, sizeof(butterfly_cb));
+ butterfly_cb.private = pp;
+ pd = parport_register_dev_model(p, "spi_butterfly", &butterfly_cb, 0);
if (!pd) {
status = -ENOMEM;
goto clean0;
@@ -321,8 +322,9 @@ static void butterfly_detach(struct parport *p)
static struct parport_driver butterfly_driver = {
.name = "spi_butterfly",
- .attach = butterfly_attach,
+ .match_port = butterfly_attach,
.detach = butterfly_detach,
+ .devmodel = true,
};
static int __init butterfly_init(void)
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Applied "spi: butterfly: use new parport device model" to the spi tree
[not found] ` <1449064071-4915-4-git-send-email-sudipm.mukherjee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2015-12-02 20:11 ` Mark Brown
0 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2015-12-02 20:11 UTC (permalink / raw)
To: Sudip Mukherjee, Mark Brown; +Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA
The patch
spi: butterfly: use new parport device model
has been applied to the spi tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 1d3029cc5f17081afdc2d6b7b50f9d0366cdbae1 Mon Sep 17 00:00:00 2001
From: Sudip Mukherjee <sudipm.mukherjee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: Wed, 2 Dec 2015 19:17:51 +0530
Subject: [PATCH] spi: butterfly: use new parport device model
Modify spi-butterfly driver to use the new parallel port device model.
Signed-off-by: Sudip Mukherjee <sudip-ofJRbWXBVFamYgehrs7/Lw@public.gmane.org>
Signed-off-by: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
drivers/spi/spi-butterfly.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/spi/spi-butterfly.c b/drivers/spi/spi-butterfly.c
index f16ef7fb10f1..22a31e4a1a11 100644
--- a/drivers/spi/spi-butterfly.c
+++ b/drivers/spi/spi-butterfly.c
@@ -189,6 +189,7 @@ static void butterfly_attach(struct parport *p)
struct butterfly *pp;
struct spi_master *master;
struct device *dev = p->physport->dev;
+ struct pardev_cb butterfly_cb;
if (butterfly || !dev)
return;
@@ -221,9 +222,9 @@ static void butterfly_attach(struct parport *p)
* parport hookup
*/
pp->port = p;
- pd = parport_register_device(p, "spi_butterfly",
- NULL, NULL, NULL,
- 0 /* FLAGS */, pp);
+ memset(&butterfly_cb, 0, sizeof(butterfly_cb));
+ butterfly_cb.private = pp;
+ pd = parport_register_dev_model(p, "spi_butterfly", &butterfly_cb, 0);
if (!pd) {
status = -ENOMEM;
goto clean0;
@@ -321,8 +322,9 @@ static void butterfly_detach(struct parport *p)
static struct parport_driver butterfly_driver = {
.name = "spi_butterfly",
- .attach = butterfly_attach,
+ .match_port = butterfly_attach,
.detach = butterfly_detach,
+ .devmodel = true,
};
static int __init butterfly_init(void)
--
2.6.2
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Applied "spi: butterfly: correct alignment" to the spi tree
[not found] ` <1449064071-4915-3-git-send-email-sudipm.mukherjee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2015-12-02 20:11 ` Mark Brown
0 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2015-12-02 20:11 UTC (permalink / raw)
To: Sudip Mukherjee, Mark Brown; +Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA
The patch
spi: butterfly: correct alignment
has been applied to the spi tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From e71fec7352c83af889ea36e164f1f6f895b0aaaf Mon Sep 17 00:00:00 2001
From: Sudip Mukherjee <sudipm.mukherjee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: Wed, 2 Dec 2015 19:17:50 +0530
Subject: [PATCH] spi: butterfly: correct alignment
checkpatch complains about the allignment with open parenthesis.
Signed-off-by: Sudip Mukherjee <sudip-ofJRbWXBVFamYgehrs7/Lw@public.gmane.org>
Signed-off-by: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
drivers/spi/spi-butterfly.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/spi/spi-butterfly.c b/drivers/spi/spi-butterfly.c
index 8fc284d0d7c3..f16ef7fb10f1 100644
--- a/drivers/spi/spi-butterfly.c
+++ b/drivers/spi/spi-butterfly.c
@@ -143,9 +143,8 @@ static void butterfly_chipselect(struct spi_device *spi, int value)
#include "spi-bitbang-txrx.h"
static u32
-butterfly_txrx_word_mode0(struct spi_device *spi,
- unsigned nsecs,
- u32 word, u8 bits)
+butterfly_txrx_word_mode0(struct spi_device *spi, unsigned nsecs, u32 word,
+ u8 bits)
{
return bitbang_txrx_be_cpha0(spi, nsecs, 0, 0, word, bits);
}
@@ -223,8 +222,8 @@ static void butterfly_attach(struct parport *p)
*/
pp->port = p;
pd = parport_register_device(p, "spi_butterfly",
- NULL, NULL, NULL,
- 0 /* FLAGS */, pp);
+ NULL, NULL, NULL,
+ 0 /* FLAGS */, pp);
if (!pd) {
status = -ENOMEM;
goto clean0;
@@ -275,7 +274,7 @@ static void butterfly_attach(struct parport *p)
pp->dataflash = spi_new_device(pp->bitbang.master, &pp->info[0]);
if (pp->dataflash)
pr_debug("%s: dataflash at %s\n", p->name,
- dev_name(&pp->dataflash->dev));
+ dev_name(&pp->dataflash->dev));
pr_info("%s: AVR Butterfly\n", p->name);
butterfly = pp;
--
2.6.2
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Applied "spi: butterfly: remove cast to void" to the spi tree
[not found] ` <1449064071-4915-2-git-send-email-sudipm.mukherjee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2015-12-02 20:11 ` Mark Brown
0 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2015-12-02 20:11 UTC (permalink / raw)
To: Sudip Mukherjee, Mark Brown; +Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA
The patch
spi: butterfly: remove cast to void
has been applied to the spi tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From b12fe7250cf013622d064a280b87b19448d26d00 Mon Sep 17 00:00:00 2001
From: Sudip Mukherjee <sudipm.mukherjee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: Wed, 2 Dec 2015 19:17:49 +0530
Subject: [PATCH] spi: butterfly: remove cast to void
checkpatch was complaining about space after cast. But the cast to void
is not required at that place.
Signed-off-by: Sudip Mukherjee <sudip-ofJRbWXBVFamYgehrs7/Lw@public.gmane.org>
Signed-off-by: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
drivers/spi/spi-butterfly.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/spi-butterfly.c b/drivers/spi/spi-butterfly.c
index f520eaa193c5..8fc284d0d7c3 100644
--- a/drivers/spi/spi-butterfly.c
+++ b/drivers/spi/spi-butterfly.c
@@ -289,7 +289,7 @@ clean2:
clean1:
parport_unregister_device(pd);
clean0:
- (void) spi_master_put(pp->bitbang.master);
+ spi_master_put(pp->bitbang.master);
done:
pr_debug("%s: butterfly probe, fail %d\n", p->name, status);
}
@@ -317,7 +317,7 @@ static void butterfly_detach(struct parport *p)
parport_release(pp->pd);
parport_unregister_device(pp->pd);
- (void) spi_master_put(pp->bitbang.master);
+ spi_master_put(pp->bitbang.master);
}
static struct parport_driver butterfly_driver = {
--
2.6.2
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Applied "spi: butterfly: remove multiple blank lines" to the spi tree
[not found] ` <1449064071-4915-1-git-send-email-sudipm.mukherjee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-12-02 13:47 ` [PATCH 4/4] spi: butterfly: use new parport device model Sudip Mukherjee
@ 2015-12-02 20:11 ` Mark Brown
1 sibling, 0 replies; 8+ messages in thread
From: Mark Brown @ 2015-12-02 20:11 UTC (permalink / raw)
To: Sudip Mukherjee, Mark Brown; +Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA
The patch
spi: butterfly: remove multiple blank lines
has been applied to the spi tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 1bfa91e9255065e8f5b8aef869eee57b8badf61e Mon Sep 17 00:00:00 2001
From: Sudip Mukherjee <sudipm.mukherjee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: Wed, 2 Dec 2015 19:17:48 +0530
Subject: [PATCH] spi: butterfly: remove multiple blank lines
checkpatch complains about multiple blank lines.
Signed-off-by: Sudip Mukherjee <sudip-ofJRbWXBVFamYgehrs7/Lw@public.gmane.org>
Signed-off-by: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
drivers/spi/spi-butterfly.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/drivers/spi/spi-butterfly.c b/drivers/spi/spi-butterfly.c
index 9a95862986c8..f520eaa193c5 100644
--- a/drivers/spi/spi-butterfly.c
+++ b/drivers/spi/spi-butterfly.c
@@ -27,7 +27,6 @@
#include <linux/mtd/partitions.h>
-
/*
* This uses SPI to talk with an "AVR Butterfly", which is a $US20 card
* with a battery powered AVR microcontroller and lots of goodies. You
@@ -37,7 +36,6 @@
* and use this custom parallel port cable.
*/
-
/* DATA output bits (pins 2..9 == D0..D7) */
#define butterfly_nreset (1 << 1) /* pin 3 */
@@ -52,14 +50,11 @@
/* CONTROL output bits */
#define spi_cs_bit PARPORT_CONTROL_SELECT /* pin 17 */
-
-
static inline struct butterfly *spidev_to_pp(struct spi_device *spi)
{
return spi->controller_data;
}
-
struct butterfly {
/* REVISIT ... for now, this must be first */
struct spi_bitbang bitbang;
@@ -140,7 +135,6 @@ static void butterfly_chipselect(struct spi_device *spi, int value)
parport_frob_control(pp->port, spi_cs_bit, value ? spi_cs_bit : 0);
}
-
/* we only needed to implement one mode here, and choose SPI_MODE_0 */
#define spidelay(X) do { } while (0)
@@ -186,7 +180,6 @@ static struct flash_platform_data flash = {
.nr_parts = ARRAY_SIZE(partitions),
};
-
/* REVISIT remove this ugly global and its "only one" limitation */
static struct butterfly *butterfly;
@@ -262,7 +255,6 @@ static void butterfly_attach(struct parport *p)
parport_write_data(pp->port, pp->lastbyte);
msleep(100);
-
/*
* Start SPI ... for now, hide that we're two physical busses.
*/
@@ -334,7 +326,6 @@ static struct parport_driver butterfly_driver = {
.detach = butterfly_detach,
};
-
static int __init butterfly_init(void)
{
return parport_register_driver(&butterfly_driver);
--
2.6.2
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-12-02 20:11 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-02 13:47 [PATCH 1/4] spi: butterfly: remove multiple blank lines Sudip Mukherjee
2015-12-02 13:47 ` [PATCH 2/4] spi: butterfly: remove cast to void Sudip Mukherjee
[not found] ` <1449064071-4915-2-git-send-email-sudipm.mukherjee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-12-02 20:11 ` Applied "spi: butterfly: remove cast to void" to the spi tree Mark Brown
2015-12-02 13:47 ` [PATCH 3/4] spi: butterfly: correct alignment Sudip Mukherjee
[not found] ` <1449064071-4915-3-git-send-email-sudipm.mukherjee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-12-02 20:11 ` Applied "spi: butterfly: correct alignment" to the spi tree Mark Brown
[not found] ` <1449064071-4915-1-git-send-email-sudipm.mukherjee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-12-02 13:47 ` [PATCH 4/4] spi: butterfly: use new parport device model Sudip Mukherjee
[not found] ` <1449064071-4915-4-git-send-email-sudipm.mukherjee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-12-02 20:11 ` Applied "spi: butterfly: use new parport device model" to the spi tree Mark Brown
2015-12-02 20:11 ` Applied "spi: butterfly: remove multiple blank lines" " Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).