[Linuxwacom-devel] [PATCH] Add support for DTK-2451 and DTH-2452
Signed-off-by: Ping Cheng--- 2.6.30/wacom_sys.c | 8 ++-- 2.6.30/wacom_wac.c | 45 +++-- 2.6.30/wacom_wac.h | 3 +++ 2.6.38/wacom_sys.c | 3 +++ 2.6.38/wacom_wac.c | 45 +++-- 2.6.38/wacom_wac.h | 3 +++ 3.7/wacom_sys.c| 3 +++ 3.7/wacom_wac.c| 45 +++-- 3.7/wacom_wac.h| 3 +++ 9 files changed, 138 insertions(+), 20 deletions(-) diff --git a/2.6.30/wacom_sys.c b/2.6.30/wacom_sys.c index ba17b1b..bdb1eb8 100644 --- a/2.6.30/wacom_sys.c +++ b/2.6.30/wacom_sys.c @@ -266,7 +266,8 @@ static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hi features->type == WACOM_24HDT || features->type == WACOM_MSPROT || features->type == DTH1152T || -features->type == WACOM_27QHDT) { +features->type == WACOM_27QHDT || +features->type == DTH2452T) { /* need to reset back */ features->pktlen = WACOM_PKGLEN_TPC2FG; if (features->type == MTTPC || @@ -275,7 +276,8 @@ static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hi features->pktlen = WACOM_PKGLEN_MTTPC; else if (features->type == WACOM_24HDT) features->pktlen = WACOM_PKGLEN_MTOUCH; - else if (features->type == WACOM_MSPROT) + else if (features->type == WACOM_MSPROT || +features->type == DTH2452T) features->pktlen = WACOM_PKGLEN_MSPROT; else if (features->type == DTH1152T || features->type == WACOM_27QHDT) @@ -317,6 +319,7 @@ static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hi case WACOM_MSPROT: case MTTPC_B: + case DTH2452T: features->x_max = get_unaligned_le16([i + 3]); features->x_phy = @@ -394,6 +397,7 @@ static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hi case WACOM_MSPROT: case MTTPC_B: + case DTH2452T: features->y_max = get_unaligned_le16([i + 3]); features->y_phy = diff --git a/2.6.30/wacom_wac.c b/2.6.30/wacom_wac.c index 90c5c2b..4d4f924 100644 --- a/2.6.30/wacom_wac.c +++ b/2.6.30/wacom_wac.c @@ -227,13 +227,16 @@ static int wacom_dtus_irq(struct wacom_wac *wacom) { unsigned char *data = wacom->data; struct input_dev *input = wacom->input; + struct wacom_features *features = >features; unsigned short prox, pressure = 0; - if (data[0] != WACOM_REPORT_DTUS && data[0] != WACOM_REPORT_DTUSPAD) { + if (data[0] != WACOM_REPORT_DTUS && data[0] != WACOM_REPORT_DTUSPAD + && data[0] != WACOM_REPORT_DTK2451PAD) { dev_dbg(input->dev.parent, "%s: received unknown report #%d", __func__, data[0]); return 0; - } else if (data[0] == WACOM_REPORT_DTUSPAD) { + } else if (data[0] == WACOM_REPORT_DTUSPAD + || data[0] == WACOM_REPORT_DTK2451PAD) { input_report_key(input, BTN_0, (data[1] & 0x01)); input_report_key(input, BTN_1, (data[1] & 0x02)); input_report_key(input, BTN_2, (data[1] & 0x04)); @@ -264,9 +267,15 @@ static int wacom_dtus_irq(struct wacom_wac *wacom) input_report_key(input, BTN_STYLUS, data[1] & 0x20); input_report_key(input, BTN_STYLUS2, data[1] & 0x40); - input_report_abs(input, ABS_X, get_unaligned_be16([3])); - input_report_abs(input, ABS_Y, get_unaligned_be16([5])); - pressure = ((data[1] & 0x03) << 8) | (data[2] & 0xff); +
[Linuxwacom-devel] [input-wacom] release.sh: Synchronize with changes made to xf86-input-wacom's release.sh
Signed-off-by: Aaron Armstrong Skomra--- release.sh | 88 ++ 1 file changed, 54 insertions(+), 34 deletions(-) diff --git a/release.sh b/release.sh index f8a484321fdd..3ca2f72d9378 100755 --- a/release.sh +++ b/release.sh @@ -15,6 +15,14 @@ export LC_ALL=C #-- +# Function: check_for_jq +#-- +# +check_for_jq() { +command -v jq >/dev/null 2>&1 || { echo >&2 "This script requires jq but it is not installed. Exiting."; exit 1;} +} + +#-- # Function: check_local_changes #-- # @@ -113,10 +121,10 @@ release_to_sourceforge () { section_path="projects/linuxwacom/files/$section" srv_path="/home/frs/project/linuxwacom/$section" -echo "creating shell on sourceforge for $USER_NAME" -ssh ${USER_NAME%@},linuxwacom@$hostname create +echo "creating shell on sourceforge for $SF_USERNAME" +ssh ${SF_USERNAME%@},linuxwacom@$hostname create #echo "Simply log out once you get to the prompt" -#ssh -t ${USER_NAME%@},linuxwacom@$hostname create +#ssh -t ${SF_USERNAME%@},linuxwacom@$hostname create #echo "Sleeping for 30 seconds, because this sometimes helps against sourceforge's random authentication denials" #sleep 30 fi @@ -125,7 +133,7 @@ release_to_sourceforge () { # srv_path="~/public_html$srv_path" # Check that the server path actually does exist -ssh $USER_NAME$hostname ls $srv_path >/dev/null 2>&1 || +ssh $SF_USERNAME$hostname ls $srv_path >/dev/null 2>&1 || if [ $? -ne 0 ]; then echo "Error: the path \"$srv_path\" on the web server does not exist." cd $top_src @@ -134,7 +142,7 @@ release_to_sourceforge () { # Check for already existing tarballs for tarball in $targz $tarbz2 $tarxz; do - ssh $USER_NAME$hostname ls $srv_path/$tarball >/dev/null 2>&1 + ssh $SF_USERNAME$hostname ls $srv_path/$tarball >/dev/null 2>&1 if [ $? -eq 0 ]; then if [ "x$FORCE" = "xyes" ]; then echo "Warning: overwriting released tarballs due to --force option." @@ -149,7 +157,7 @@ release_to_sourceforge () { # Upload to host using the 'scp' remote file copy program if [ x"$DRY_RUN" = x ]; then echo "Info: uploading tarballs to web server:" - scp $targz $tarbz2 $tarxz $siggz $sigbz2 $sigxz $USER_NAME$hostname:$srv_path + scp $targz $tarbz2 $tarxz $siggz $sigbz2 $sigxz $SF_USERNAME$hostname:$srv_path if [ $? -ne 0 ]; then echo "Error: the tarballs uploading failed." cd $top_src @@ -159,6 +167,13 @@ release_to_sourceforge () { echo "Info: skipping tarballs uploading in dry-run mode." echo " \"$srv_path\"." fi + +host_current="sourceforge.net" +section_path="projects/linuxwacom/files/$section" +# DL_URL & PGP_URL will be overwritten by the Github download url if github was +# enabled on the command line +DL_URL="http://$host_current/$section_path/$tarbz2; +PGP_URL="http://$host_current/$section_path/$tarbz2.sig; } #-- @@ -183,12 +198,13 @@ check_json_message() { release_to_github() { # Creating a release on Github automatically creates a tag. -#dependency 'jq' for reading the json github sends us back +# dependency 'jq' for reading the json github sends us back -#note git_username should include the suffix ":KEY" if the user has enabled 2FA -#example skomra:de0e4dc3efbf2d008053027708227b365b7f80bf +# note git_username should include the suffix ":KEY" if the user has enabled 2FA +# example skomra:de0e4dc3efbf2d008053027708227b365b7f80bf -GH_REPO=linuxwacom +GH_REPO="linuxwacom" +PROJECT="input-wacom" release_description="Temporary Empty Release Description" release_descr=$(jq -n --arg release_description "$release_description" '$release_description') @@ -199,7 +215,7 @@ release_to_github() { "body": %s, "draft": false, "prerelease": false}' "$tar_name" "$tar_name" "$release_descr") -create_result=`curl -s --data "$api_json" -u $GH_USERNAME https://api.github.com/repos/$GH_REPO/input-wacom/releases` +create_result=`curl -s --data "$api_json" -u $GH_USERNAME https://api.github.com/repos/$GH_REPO/$PROJECT/releases` GH_RELEASE_ID=`echo $create_result | jq '.id'` check_json_message "$create_result" @@ -208,8 +224,8 @@ release_to_github() { upload_result=`curl -s -u