From: Daniel Ribeiro <drwyrm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: David Brownell <david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
Cc: Stefan Schmidt <stefan-4Bgg8jF3iZdg9hUCZPvPmw@public.gmane.org>,
eric.y.miao-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
sameo-RWuK6r/cQWRpLGFMi4vTTA@public.gmane.org,
linux-arm-kernel-xIg/pKzrS19vn6HldHNs0ANdhmdF6hFW@public.gmane.org,
Stefan Schmidt
<stefan-OrPQZGeq07wqhVmZOOOmNx2eb7JE58TQ@public.gmane.org>
Subject: Re: [patch 05/14] mfd: PCAP2 driver
Date: Sun, 23 Nov 2008 01:38:57 -0200 [thread overview]
Message-ID: <1227411537.3148.22.camel@brutus> (raw)
In-Reply-To: <200811221819.53186.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
Em Sáb, 2008-11-22 às 18:19 -0800, David Brownell escreveu:
> SPI-specific bits:
>
> - I'd have to see the patch. The last one I saw still didn't
> list a SPI_MASTER dependency for the core MFD module.
The next one will.
> - You should make ezx_pcap_write() and ezx_pcap_read() switch
> over to spi_write_then_read(), to ensure it's never doing
> DMA to/from the stack. I see a byte-order dependency too...
I tried spi_write_then_read before, but it didn't work. I supposed it
was because it was doing 2 transfers as the second transfer rx_buf
always came zeroed. I see that commit
f9b90e39cbc5c4d6ef60022fd1f25d541df0aad1 changed it to do a single
transfer, so i will try it again.
> - For general paranoia, the probe() should abort if pcap.spi is
> already set ... and its cleanup path, plus remove(), should
> null that pointer.
Ok.
> - If you're going to mark the probe() as __devinit, then mark
> the remove() as __devexit and use __devexit_p() in the driver
> struct.
Ok. Shouldn't i use __init instead?
> Other comments about the pcap2 core:
> - Those show_regs/store_regs calls would IMO make more sense
> in debugfs than in sysfs.
I will just remove those for now.
> - The set_vreg() stuff would seem to make more sense in a
> regulator subdevice and driver ... but that's more of a
> general driver structure thing, and might be fixed later.
>
> - Andrew seems to always want a comment explaining why the
> IRQ handler for I2C and SPI devices needs to queue_work().
> Maybe the threaded IRQ stuff will help there...
>
> - The mask_event()/unmask_event() stuff looks like you're
> more or less reinventing a baby "struct irq_chip", with
> register_event() instead of request_irq().
> Re the IRQ stuff, this looks more like what i2c/chips/menelaus.c
> did than mfd/twl4030-irq.c ... in general I think it's better to
> pursue the latter approach, making genirq handle such stuff.
> (Even though it's kind of awkward to use it for I2C or SPI based
> interrupt controllers just now.)
I didn't know i could use genirq with spi. In fact i was using genirq
before, when the driver was using ssp.c. Now, looking at twl4030-irq.c
its clear how i should have done this. Thanks!!
> - And the ADC sysfs support isn't supporting hwmon models.
> (Neither does the twl4030 ADC support, but that's not been
> submitted for mainline yet either...)
I will look into this after i finish the irq stuff.
This is a lot of stuff, thanks for the review. :)
--
Daniel Ribeiro
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general
next prev parent reply other threads:[~2008-11-23 3:38 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20081121160403.073751031@dodger.lab.datenfreihafen.org>
2008-11-21 16:04 ` [patch 05/14] mfd: PCAP2 driver stefan-OrPQZGeq07wqhVmZOOOmNx2eb7JE58TQ
[not found] ` <20081121160521.016544616-cQQG9CVUopzFITZdfPi31ZcF1vblOVnWhIvA6WVW+J8@public.gmane.org>
2008-11-22 5:25 ` David Brownell
2008-11-22 14:01 ` [spi-devel-general] " Eric Miao
[not found] ` <f17812d70811220601p1d7af668mf3265224179753ab-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-11-22 15:54 ` Daniel Ribeiro
2008-11-22 19:08 ` David Brownell
[not found] ` <200811221108.54331.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-11-22 23:29 ` Stefan Schmidt
[not found] ` <200811212125.49068.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-11-22 17:12 ` Daniel Ribeiro
2008-11-22 19:19 ` David Brownell
[not found] ` <200811221119.27981.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-11-22 23:33 ` Stefan Schmidt
[not found] ` <20081122233356.GC24437-OrPQZGeq07wqhVmZOOOmNx2eb7JE58TQ@public.gmane.org>
2008-11-22 23:58 ` David Brownell
[not found] ` <200811221558.03915.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-11-23 0:33 ` Stefan Schmidt
[not found] ` <20081123003306.GE24437-OrPQZGeq07wqhVmZOOOmNx2eb7JE58TQ@public.gmane.org>
2008-11-23 2:19 ` David Brownell
[not found] ` <200811221819.53186.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-11-23 3:38 ` Daniel Ribeiro [this message]
2008-11-23 4:59 ` David Brownell
[not found] ` <200811222059.59806.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-11-23 7:06 ` Daniel Ribeiro
2008-11-23 8:26 ` David Brownell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1227411537.3148.22.camel@brutus \
--to=drwyrm-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org \
--cc=eric.y.miao-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-arm-kernel-xIg/pKzrS19vn6HldHNs0ANdhmdF6hFW@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=sameo-RWuK6r/cQWRpLGFMi4vTTA@public.gmane.org \
--cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=stefan-4Bgg8jF3iZdg9hUCZPvPmw@public.gmane.org \
--cc=stefan-OrPQZGeq07wqhVmZOOOmNx2eb7JE58TQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).