linux-laptop.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wu Zhangjin <wuzhangjin@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	linux-mips@linux-mips.org, Richard Purdie <rpurdie@rpsys.net>,
	lm-sensors@lm-sensors.org, linux-input@vger.kernel.org,
	linux-laptop@vger.kernel.org,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	sfr@linuxcare.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] [loongson] yeeloong2f: add platform specific support
Date: Thu, 26 Nov 2009 14:26:44 +0800	[thread overview]
Message-ID: <1259216804.4989.54.camel@falcon.domain.org> (raw)
In-Reply-To: <20091126060854.GK23244@core.coreip.homeip.net>

On Wed, 2009-11-25 at 22:08 -0800, Dmitry Torokhov wrote:
[...]
> > > > +	/* SW_VIDEOOUT_INSERT? not included in hald-addon-input! */
> > > > +	{KE_KEY, EVENT_CRT_DETECT, KEY_PROG1},
> > 
> > any available event for reporting the inserted CRT in hald-addon-input?
> 
> Hmm.. not really. Again, does not seem to be related to input subsystem
> but video one.

It's time to remove it from keymap now, I have done some job in the
video_output subdriver for this event ;)

> > > > +	/* Seems battery subdriver should report it */
> > > > +	{KE_KEY, EVENT_OVERTEMP, KEY_PROG2},
> > > 
> > > Does not seem to be an input event?
> > > 
> > 
> > It is not an input event, Will remove it from the keymap table.
> >  
> > BTW: how can we handle this stuff(overtemp...)? lm-sensors? Perhaps
> > temp1_max_alarm or temp1_crit_alarm?
> > 
> 
> Not really sure... HWMON list is a good place to ask I think.

okay, will split the hwmon driver out and send it to lm-sensors mailing
list.

> 
> > > > +	/*{KE_KEY, EVENT_AC_BAT, KEY_BATTERY},*/
> > > > +	{KE_KEY, EVENT_CAMERA, KEY_CAMERA},	/* Fn + ESC */
> > > > +	{KE_KEY, EVENT_SLEEP, KEY_SLEEP},	/* Fn + F1 */
> > > > +	/* Seems not clear? not included in hald-addon-input! */
> > > > +	{KE_KEY, EVENT_BLACK_SCREEN, KEY_PROG3},	/* Fn + F2 */
> > > 
> > > Do you mean "lock screen"?
> > 
> > not lock, close the backlight of the display, any available event here?
> 
> What is it then? A switch that turns off backlight? What is the expected
> reaction to it?
> 

Yes, a switch for turning off/on the backlight, seems no need to report
this key to the users, will remove it too.

> > > > +	if (!yeeloong_hotkey_dev)
> > > > +		return -ENOMEM;
> > > 
> > > Error unwinding?
> > 
> > Sorry, not clear what do you mean here?
> 
> If you just return you will have the SCI stuff that you did a few lines
> above installed... I am concerned whether it is a good idea.
> 

get it, thanks!

I have checked the return value in the module init function:

[...]

yeeloong_init()
{
	[...]
        ret = yeeloong_hotkey_init(&yeeloong_pdev->dev);
        if (ret) {
                yeeloong_hotkey_exit();
                printk(KERN_INFO "Fail init yeeloong hotkey driver.\n");
                return ret;
        }
	[...]

}

[...]

static void yeeloong_hotkey_exit(void)
{
        /* free irq */
        remove_irq(SCI_IRQ_NUM, &sci_irqaction);
	 ...
}

but as a standalone driver, It's better to do something as following:

if (!yeeloong_hotkey_dev) {
	yeeloong_hotkey_exit();
	return -ENOMEM;
}

Thanks & Regards!
	Wu Zhangjin


      reply	other threads:[~2009-11-26  6:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-21 12:08 [PATCH v2] [loongson] yeeloong2f: add platform specific support Wu Zhangjin
2009-11-26  4:10 ` Dmitry Torokhov
2009-11-26  6:00   ` Wu Zhangjin
2009-11-26  6:08     ` Dmitry Torokhov
2009-11-26  6:26       ` Wu Zhangjin [this message]

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=1259216804.4989.54.camel@falcon.domain.org \
    --to=wuzhangjin@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-laptop@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=lm-sensors@lm-sensors.org \
    --cc=ralf@linux-mips.org \
    --cc=rpurdie@rpsys.net \
    --cc=sfr@canb.auug.org.au \
    --cc=sfr@linuxcare.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).