public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Nishanth Menon <menon.nishanth@gmail.com>
To: "Syed Mohammed, Khasim" <x0khasim@ti.com>
Cc: linux-omap-open-source@linux.omap.com
Subject: Re: [PATCH] TWL4030 Keypad driver - incorporated review comments
Date: Thu, 10 May 2007 20:00:35 -0500	[thread overview]
Message-ID: <4643C033.3020209@gmail.com> (raw)
In-Reply-To: <9C23CDD79DA20A479D4615857B2E2C47E26872@dlee13.ent.ti.com>

Syed Mohammed, Khasim stated on 5/10/2007 7:19 PM:
> I feel like not doing this, fundamental reason is we don't have an open TRM for TWL4030, this code is new to community and I don't want to confuse developers more. This though takes some kind of space is easy to understand and comment on. I can definitely revisit once I see some kind of usage of TWL4030 driver in community and having a public TRM to explain the same. Also I am just targeting drivers to get into some respectable form in GIT then we can improve them for more functionality and 
>   
I can send a patch for the same if you'd like to save yourself the
effort ;).... but just hoping to save git some bytes.. and hoping to see
some readable(it did take me a short while{due to the dud head i am}
that _M is infact a mask) code instead :D ... hoping to see a *public*
TRM may not happen even for 2430 - it needs to be recieved thru FAEs..
folks can get the T2 TRMs thru FAEs if they so desire..
Here are some more 1 cent comments in arnd 15 mins of patch look through:
> +#define OMAP_TWL4030KP_LOG_LEVEL    1
why enable debug by default?
> +void omap_kp_timer(unsigned long data)
> +{
> +    schedule_work(&timer_work);
> +}
ofcourse possibly workitem schedule overheads.. versus userlevel thread
running and scheduling it..

> +#define SCAN_RATE        HZ/20
what if I change my HZ to say 1000? should I not have this as a
configurable option -> just thinking....

> +#if (OMAP_TWL4030KP_LOG_LEVEL >= 1)
> +char *switch_name[NUM_ROWS][NUM_COLS] = {
this could have been static

> +		for (col = 0; col < NUM_COLS; col++) {
> +			int key;
> +
> +			if (!(changed & (1 << col)))
> +				continue;
Cant we use changed and a while loop to iterate less instead of a continue?

+	omap_twl4030kp->id.vendor	= 0x0001;
+	omap_twl4030kp->id.product	= 0x0001;
+	omap_twl4030kp->id.version	= 0x0003;
what are those? is there some registration values?
+	if (ret < 0) goto err3;
coding standard? should not goto err3 go below the if()?
+	/* Set Pre Scalar Field PTV to 4 */
+	reg = BIT_LK_PTV_REG_PTV_M & (BIT_PTV_REG_PTV4 << BIT_LK_PTV_REG_PTV);
why if i already have a bunch of _M masks defined - I am confused on this :)?
+#if (OMAP_TWL4030KP_LOG_LEVEL >= 1)
+	printk
+	  ("****TWL4030 keypad module configuration registers dump****\n");
+	twl4030_kpread_u8(TWL4030_MODULE_KEYPAD, &reg, REG_KEYP_CTRL_REG);
+	printk("Register REG_KEYP_CTRL_REG : %X\n", reg);

arent we supposed to use that kernel debug printk?
>  /* Placeholder for 2430SDP specific defines */
> -#define OMAP24XX_ETHR_START		 0x08000300
> +#define OMAP24XX_ETHR_START		0x08000300
what is this change anyway?
> -#define NR_IRQS				(IH_TWL4030_END)
> +
> +/* TWL4030 GPIO Interrupts */
> +#define IH_TWL4030_GPIO_BASE		(IH_TWL4030_END)
> +#define IH_TWL4030_GPIO_END		(IH_TWL4030_BASE+18)
> +#define NR_IRQS				(IH_TWL4030_GPIO_END)
>  
<snip>
> +
> +#define TWL4030_GPIO_MIN		0
> +#define TWL4030_GPIO_MAX		18
> +#define TWL4030_GPIO_MAX_CD		2
> +#define TWL4030_GPIO_IRQ_NO(n)		(IH_TWL4030_GPIO_BASE+n)
> +#define TWL4030_GPIO_IS_INPUT		1
> +#define TWL4030_GPIO_IS_OUTPUT		0
> +#define TWL4030_GPIO_IS_ENABLE		1

Should'nt this be a different patch - something like t2-gpio?

Regards,
Nishanth Menon

  reply	other threads:[~2007-05-11  1:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-10 19:40 [PATCH] TWL4030 Keypad driver - incorporated review comments Syed Mohammed, Khasim
2007-05-11  0:04 ` nishanth menon
2007-05-11  0:19   ` Syed Mohammed, Khasim
2007-05-11  1:00     ` Nishanth Menon [this message]
2007-05-12  0:50       ` nishanth menon
2007-05-16 16:13         ` tony
2007-05-16 16:16           ` Syed Mohammed, Khasim
2007-05-16 16:19             ` tony
2007-05-16 16:35               ` Syed Mohammed, Khasim
2007-05-16 17:19           ` Dmitry Krivoschekov
2007-05-16 17:31             ` Syed Mohammed, Khasim
2007-05-16 22:04               ` Tony Lindgren

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=4643C033.3020209@gmail.com \
    --to=menon.nishanth@gmail.com \
    --cc=linux-omap-open-source@linux.omap.com \
    --cc=x0khasim@ti.com \
    /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