Skip to contentSkip to conversation

Adding 'half shutter' definition to 'input.h'

DISCUSSION Kim Kyuwon 3 participants 5 messages Jan 8, 2009 – Jan 12, 2009 3 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Kim Kyuwon

author
#3 lore raw
In reply to a message not in the archive

Hi, All

Because Jiri Kosina personally agrees with adding the [half]shutter key yesterday,
I'm sending this patch. (Thanks Jiri)

New cameras and mobile phones (at least SAMSUNG's) have the half shutter for 'auto-focus' functions. so I think this half and full shutter keys are needed.

Please review this patch.
Thank you!

Quoted 36 lines · 김규원

Thanks for your reply ;)

Quoted 15 lines · Dmitry Torokhov

Hi Kim,

Quoted 12 lines · On Monday 22 December 2008 22:27:51 Kyu-Won Kim wrote:

Hi Dmitry,

We are making the camera application for mobile phone and our products have half shutter (the technical name of buttion is "Double-action Side-operation Type Light Touch Switch") as other general cameras. Datasheet is here:
http://www.datasheetpro.com/205793_view_EVQQ0C03K_datasheet.html

The problem is that there is no KEY definition for half shutter in input.h. I think KEY_CAMERA is the most related key but we need more definitions like KEY_CAMERA2, KEY_HALFSUTTER or KEY_FULLSHUTTER

Quoted 6 lines
Quoted 2 lines

Could you give me your opinions about this half shutter

Hmm, we certainly could add some more key definitions, but given that the usage is very tightly coupled to the device and application I wonder if you should simply use KEY_PROG* there...

We can simply use KEY_PROG1, but state-of-the-art digital camera supports 'auto-focus' functions and therefore I think Half-Shutter key is a MUST. (I'm sure there are many digital cameras which use Linux as OS).

Quoted 2 lines

Let's CC Jiri Kosina and see if he has any input on this matter.

Can I ask Kosina's opinion, too?

Quoted 1 line
Quoted 8 lines
Quoted 3 lines

--
Dmitry

--
Kim Kyuwon

commit a2f0629f9202433cd2b23b5c951dae66fd2b4f14

Author: Kim Kyuwon <[email protected]>
Date:   Thu Jan 8 11:08:43 2009 +0900

Input: add definitions for camera full and half shutters

include/linux/input.h +3 -0
index 9a6355f..41ed2fb 100644
@@ -541,6 +541,9 @@ struct input_absinfo {
 #define KEY_CONTEXT_MENU	0x1b6	/* GenDesc - system context menu */
 #define KEY_MEDIA_REPEAT	0x1b7	/* Consumer - transport control */
 
+#define KEY_HALF_SHUTTER	0x1b8
+#define KEY_FULL_SHUTTER	0x1b9
+
 #define KEY_DEL_EOL		0x1c0
 #define KEY_DEL_EOS		0x1c1
 #define KEY_INS_LINE		0x1c2
Signature · 1 line
Kim Kyuwon
#4 lore raw
Quoted 5 lines · Kim Kyuwon

Because Jiri Kosina personally agrees with adding the [half]shutter key yesterday, I'm sending this patch. (Thanks Jiri)
New cameras and mobile phones (at least SAMSUNG's) have the half shutter for 'auto-focus' functions. so I think this half and full shutter keys are needed. Please review this patch.

Hi,

please note the "if there is any in-kernel code that actually uses it" part of my e-mail. Adding just the key definition without any kernel code actually using is not likely to happen.

Thanks,

Signature · 2 lines
Jiri Kosina
SUSE Labs
maintainer
#5 lore raw

Hi Kim, Jiri,

Quoted 8 lines · Jiri Kosina
Quoted 5 lines · Kim Kyuwon

Because Jiri Kosina personally agrees with adding the [half]shutter key yesterday, I'm sending this patch. (Thanks Jiri)
New cameras and mobile phones (at least SAMSUNG's) have the half shutter for 'auto-focus' functions. so I think this half and full shutter keys are needed. Please review this patch.

Quoted 6 lines

Hi,

please note the "if there is any in-kernel code that actually uses it" part of my e-mail. Adding just the key definition without any kernel code actually using is not likely to happen.

Additionally I don't think we need 2 new codes. We have KEY_CAMERA that is supposed to be sent when we want to take the picture, so only one new is needed. Probably should call it KEY_FOCUS or KEY_CAMERA_FOCUS.

Signature · 1 line
Dmitry
author
#6 lore raw

Hi, Dmitry,

Quoted 18 lines · Dmitry Torokhov

Hi Kim, Jiri,

Quoted 8 lines · Jiri Kosina
Quoted 5 lines · Kim Kyuwon

Because Jiri Kosina personally agrees with adding the [half]shutter key yesterday, I'm sending this patch. (Thanks Jiri)
New cameras and mobile phones (at least SAMSUNG's) have the half shutter for 'auto-focus' functions. so I think this half and full shutter keys are needed. Please review this patch.

Quoted 6 lines

Hi,

please note the "if there is any in-kernel code that actually uses it" part of my e-mail. Adding just the key definition without any kernel code actually using is not likely to happen.

Quoted 7 lines

Additionally I don't think we need 2 new codes. We have KEY_CAMERA that is supposed to be sent when we want to take the picture, so only one new is needed. Probably should call it KEY_FOCUS or KEY_CAMERA_FOCUS.

--
Dmitry

OK, It seems like your suggestion is better mine :) (Personally I prefer KEY_FOCUS to KEY_CAMERA_FOCUS )
And I would be really satisfied, if any key which can represent the half shutter is added to 'input.h'

Thank you for thinking this issue again.
If there are further steps that I can take, please let me know.

Signature · 1 line
Kim Kyuwon
maintainer
#7 lore raw

Hi Kim,

Quoted 30 lines · Kim Kyuwon

Hi, Dmitry,

Quoted 18 lines · Dmitry Torokhov

Hi Kim, Jiri,

Quoted 8 lines · Jiri Kosina
Quoted 5 lines · Kim Kyuwon

Because Jiri Kosina personally agrees with adding the [half]shutter key yesterday, I'm sending this patch. (Thanks Jiri)
New cameras and mobile phones (at least SAMSUNG's) have the half shutter for 'auto-focus' functions. so I think this half and full shutter keys are needed. Please review this patch.

Quoted 6 lines

Hi,

please note the "if there is any in-kernel code that actually uses it" part of my e-mail. Adding just the key definition without any kernel code actually using is not likely to happen.

Quoted 7 lines

Additionally I don't think we need 2 new codes. We have KEY_CAMERA that is supposed to be sent when we want to take the picture, so only one new is needed. Probably should call it KEY_FOCUS or KEY_CAMERA_FOCUS.

--
Dmitry

Quoted 8 lines

OK, It seems like your suggestion is better mine :) (Personally I prefer KEY_FOCUS to KEY_CAMERA_FOCUS )
And I would be really satisfied, if any key which can represent the half shutter is added to 'input.h'

Thank you for thinking this issue again.
If there are further steps that I can take, please let me know.

Just add the key definition to input.h and send it along with the rest of the driver when you feel that it is ready to be merged in mainline.

Thanks.

Signature · 1 line
Dmitry