From fc5ff4a0d722ac95a773d364956f349b564144c4 Mon Sep 17 00:00:00 2001 From: David Barbion Date: Sat, 18 Jun 2022 12:40:36 +0200 Subject: [PATCH] feat: update xpi_gamecon to 0.3 --- .../0001-chore-remove-osd-stuff.patch | 10 +++++----- ...02-feat-add-volume-wheel-input-driver.patch | 18 +++++++++--------- .../0003-feat-set-joystick-as-hat.patch | 14 +++++++------- ...04-feat-add-power-button-input-device.patch | 18 +++++++++--------- package/xpi_gamecon_rpi/xpi_gamecon_rpi.mk | 2 +- 5 files changed, 31 insertions(+), 31 deletions(-) diff --git a/package/xpi_gamecon_rpi/0001-chore-remove-osd-stuff.patch b/package/xpi_gamecon_rpi/0001-chore-remove-osd-stuff.patch index af08d43fb7..46d4300cb9 100644 --- a/package/xpi_gamecon_rpi/0001-chore-remove-osd-stuff.patch +++ b/package/xpi_gamecon_rpi/0001-chore-remove-osd-stuff.patch @@ -1,4 +1,4 @@ -From f9c0dbf3348f6716a88606223cd8c065d8747e11 Mon Sep 17 00:00:00 2001 +From 91f859f3098bbf27ec587beecac9ee7713e14a42 Mon Sep 17 00:00:00 2001 From: David Barbion Date: Tue, 6 Apr 2021 22:22:53 +0200 Subject: [PATCH 1/4] chore: remove osd stuff @@ -8,10 +8,10 @@ Subject: [PATCH 1/4] chore: remove osd stuff 1 file changed, 19 deletions(-) diff --git a/xpi_gamecon.c b/xpi_gamecon.c -index 5cbdfc7..e156c45 100644 +index 5e07cb1..a74a2d1 100644 --- a/xpi_gamecon.c +++ b/xpi_gamecon.c -@@ -409,23 +409,6 @@ static u32 __init gc_bcm_peri_base_probe(void) { +@@ -412,23 +412,6 @@ static u32 __init gc_bcm_peri_base_probe(void) { return base_address == 1 ? 0x02000000 : base_address; } @@ -35,7 +35,7 @@ index 5cbdfc7..e156c45 100644 static int __init gc_init(void) { /* BCM board peripherals address base */ -@@ -436,8 +419,6 @@ static int __init gc_init(void) +@@ -439,8 +422,6 @@ static int __init gc_init(void) values.red_val = 100; values.green_val = 100; @@ -45,5 +45,5 @@ index 5cbdfc7..e156c45 100644 gc_bcm2708_peri_base = gc_bcm_peri_base_probe(); if (!gc_bcm2708_peri_base) { -- -2.34.1 +2.36.1 diff --git a/package/xpi_gamecon_rpi/0002-feat-add-volume-wheel-input-driver.patch b/package/xpi_gamecon_rpi/0002-feat-add-volume-wheel-input-driver.patch index 07beab478d..7140f02ac1 100644 --- a/package/xpi_gamecon_rpi/0002-feat-add-volume-wheel-input-driver.patch +++ b/package/xpi_gamecon_rpi/0002-feat-add-volume-wheel-input-driver.patch @@ -1,4 +1,4 @@ -From 66e9a79663319b3f715fb6188338ec19b93c623d Mon Sep 17 00:00:00 2001 +From 05423d13d57f472cf256b270694599fcfb4fdd60 Mon Sep 17 00:00:00 2001 From: David Barbion Date: Tue, 6 Apr 2021 22:23:10 +0200 Subject: [PATCH 2/4] feat: add volume wheel input driver @@ -8,10 +8,10 @@ Subject: [PATCH 2/4] feat: add volume wheel input driver 1 file changed, 48 insertions(+) diff --git a/xpi_gamecon.c b/xpi_gamecon.c -index e156c45..f822065 100644 +index a74a2d1..6e9a8ab 100644 --- a/xpi_gamecon.c +++ b/xpi_gamecon.c -@@ -72,6 +72,7 @@ int gc_btn_size = sizeof(gc_btn); +@@ -74,6 +74,7 @@ int gc_btn_size = sizeof(gc_btn); struct gc { struct input_dev *dev; @@ -19,7 +19,7 @@ index e156c45..f822065 100644 struct timer_list timer; int used; struct mutex mutex; -@@ -168,6 +169,7 @@ static void gc_timer(struct timer_list *t) +@@ -170,6 +171,7 @@ static void gc_timer(struct timer_list *t) unsigned char data[32]; struct input_dev *dev = gc->dev; @@ -27,7 +27,7 @@ index e156c45..f822065 100644 int byteindex; long bitindex; -@@ -262,6 +264,9 @@ static void gc_timer(struct timer_list *t) +@@ -264,6 +266,9 @@ static void gc_timer(struct timer_list *t) input_sync(dev); @@ -37,7 +37,7 @@ index e156c45..f822065 100644 batt_val = (int)(data[7]*5)+2950; //Battery Voltage cur_val = (int)((signed char)data[8])*50; //Current percent_val = data[9]; //battery percentage -@@ -336,6 +341,45 @@ err_free_dev: +@@ -339,6 +344,45 @@ err_free_dev: return err; } @@ -83,7 +83,7 @@ index e156c45..f822065 100644 static struct gc __init *gc_probe(void) { struct gc *gc; -@@ -354,6 +398,8 @@ static struct gc __init *gc_probe(void) +@@ -357,6 +401,8 @@ static struct gc __init *gc_probe(void) err = gc_setup_pad(gc); if (err) goto err_unreg_devs; @@ -92,7 +92,7 @@ index e156c45..f822065 100644 return gc; err_unreg_devs: -@@ -367,6 +413,8 @@ static void gc_remove(struct gc *gc) +@@ -370,6 +416,8 @@ static void gc_remove(struct gc *gc) { if (gc->dev) input_unregister_device(gc->dev); @@ -102,5 +102,5 @@ index e156c45..f822065 100644 } -- -2.34.1 +2.36.1 diff --git a/package/xpi_gamecon_rpi/0003-feat-set-joystick-as-hat.patch b/package/xpi_gamecon_rpi/0003-feat-set-joystick-as-hat.patch index 70a8cd8341..777d38cf3a 100644 --- a/package/xpi_gamecon_rpi/0003-feat-set-joystick-as-hat.patch +++ b/package/xpi_gamecon_rpi/0003-feat-set-joystick-as-hat.patch @@ -1,4 +1,4 @@ -From 186f84e8e48f689856c849685a1ff3cdda28421b Mon Sep 17 00:00:00 2001 +From 61c23a323d6ab0689ddf11e356768b8fa545e59e Mon Sep 17 00:00:00 2001 From: David Barbion Date: Sun, 11 Apr 2021 19:05:33 +0200 Subject: [PATCH 3/4] feat: set joystick as hat @@ -8,10 +8,10 @@ Subject: [PATCH 3/4] feat: set joystick as hat 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/xpi_gamecon.c b/xpi_gamecon.c -index f822065..bbafc3d 100644 +index 6e9a8ab..cbe90da 100644 --- a/xpi_gamecon.c +++ b/xpi_gamecon.c -@@ -61,14 +61,10 @@ static const short gc_btn[] = { BTN_A, //A +@@ -63,14 +63,10 @@ static const short gc_btn[] = { BTN_A, //A BTN_SELECT, //Select BTN_START, //Start BTN_THUMBL, //Left Thumb @@ -27,7 +27,7 @@ index f822065..bbafc3d 100644 struct gc { struct input_dev *dev; -@@ -243,9 +239,6 @@ static void gc_timer(struct timer_list *t) +@@ -245,9 +241,6 @@ static void gc_timer(struct timer_list *t) lastgood++; @@ -37,7 +37,7 @@ index f822065..bbafc3d 100644 input_report_key(dev, gc_btn[0], !(data[3]&0x01)); //A input_report_key(dev, gc_btn[1], !(data[3]&0x02)); //B input_report_key(dev, gc_btn[2], !(data[3]&0x04)); //C -@@ -255,12 +248,12 @@ static void gc_timer(struct timer_list *t) +@@ -257,12 +250,12 @@ static void gc_timer(struct timer_list *t) input_report_key(dev, gc_btn[6], data[3]&0x40); //Select input_report_key(dev, gc_btn[7], data[3]&0x80); //Start input_report_key(dev, gc_btn[8], data[4]&0x40); //Left Thumb @@ -56,7 +56,7 @@ index f822065..bbafc3d 100644 input_sync(dev); -@@ -321,6 +314,8 @@ static int __init gc_setup_pad(struct gc *gc) +@@ -324,6 +317,8 @@ static int __init gc_setup_pad(struct gc *gc) input_set_abs_params(input_dev, ABS_X, 0, 255, 0, 0); input_set_abs_params(input_dev, ABS_Y, 0, 255, 0, 0); @@ -66,5 +66,5 @@ index f822065..bbafc3d 100644 err = input_register_device(input_dev); if (err) -- -2.34.1 +2.36.1 diff --git a/package/xpi_gamecon_rpi/0004-feat-add-power-button-input-device.patch b/package/xpi_gamecon_rpi/0004-feat-add-power-button-input-device.patch index bb244dbeb0..ee30ee755b 100644 --- a/package/xpi_gamecon_rpi/0004-feat-add-power-button-input-device.patch +++ b/package/xpi_gamecon_rpi/0004-feat-add-power-button-input-device.patch @@ -1,4 +1,4 @@ -From bc81e07fb70c767045b0e4fbb4bf6e8d5cd44549 Mon Sep 17 00:00:00 2001 +From dcc764ccc711134e23989d5faf356f9e4046e09e Mon Sep 17 00:00:00 2001 From: David Barbion Date: Sun, 25 Jul 2021 21:56:04 +0200 Subject: [PATCH 4/4] feat: add power button input device @@ -8,10 +8,10 @@ Subject: [PATCH 4/4] feat: add power button input device 1 file changed, 48 insertions(+) diff --git a/xpi_gamecon.c b/xpi_gamecon.c -index bbafc3d..09461be 100644 +index cbe90da..d2c9446 100644 --- a/xpi_gamecon.c +++ b/xpi_gamecon.c -@@ -69,6 +69,7 @@ int gc_btn_size = sizeof(gc_btn)/sizeof(gc_btn[0]); +@@ -71,6 +71,7 @@ int gc_btn_size = sizeof(gc_btn)/sizeof(gc_btn[0]); struct gc { struct input_dev *dev; struct input_dev *volume_dev; @@ -19,7 +19,7 @@ index bbafc3d..09461be 100644 struct timer_list timer; int used; struct mutex mutex; -@@ -166,6 +167,7 @@ static void gc_timer(struct timer_list *t) +@@ -168,6 +169,7 @@ static void gc_timer(struct timer_list *t) unsigned char data[32]; struct input_dev *dev = gc->dev; struct input_dev *volume_dev = gc->volume_dev; @@ -27,7 +27,7 @@ index bbafc3d..09461be 100644 int byteindex; long bitindex; -@@ -260,6 +262,9 @@ static void gc_timer(struct timer_list *t) +@@ -262,6 +264,9 @@ static void gc_timer(struct timer_list *t) input_report_abs(volume_dev, ABS_VOLUME, data[6]); //Y Axis input_sync(volume_dev); @@ -37,7 +37,7 @@ index bbafc3d..09461be 100644 batt_val = (int)(data[7]*5)+2950; //Battery Voltage cur_val = (int)((signed char)data[8])*50; //Current percent_val = data[9]; //battery percentage -@@ -375,6 +380,43 @@ err_free_dev: +@@ -378,6 +383,43 @@ err_free_dev: return err; } @@ -81,7 +81,7 @@ index bbafc3d..09461be 100644 static struct gc __init *gc_probe(void) { struct gc *gc; -@@ -395,10 +437,14 @@ static struct gc __init *gc_probe(void) +@@ -398,10 +440,14 @@ static struct gc __init *gc_probe(void) if (err) goto err_unreg_devs; err = gc_setup_volume(gc); if (err) goto err_unreg_devs; @@ -96,7 +96,7 @@ index bbafc3d..09461be 100644 kfree(gc); err_out: return ERR_PTR(err); -@@ -410,6 +456,8 @@ static void gc_remove(struct gc *gc) +@@ -413,6 +459,8 @@ static void gc_remove(struct gc *gc) input_unregister_device(gc->dev); if (gc->volume_dev) input_unregister_device(gc->volume_dev); @@ -106,5 +106,5 @@ index bbafc3d..09461be 100644 } -- -2.34.1 +2.36.1 diff --git a/package/xpi_gamecon_rpi/xpi_gamecon_rpi.mk b/package/xpi_gamecon_rpi/xpi_gamecon_rpi.mk index b234c9782a..a63de1e35b 100644 --- a/package/xpi_gamecon_rpi/xpi_gamecon_rpi.mk +++ b/package/xpi_gamecon_rpi/xpi_gamecon_rpi.mk @@ -4,7 +4,7 @@ # ################################################################################ -XPI_GAMECON_RPI_VERSION = v0.2 +XPI_GAMECON_RPI_VERSION = v0.3 XPI_GAMECON_RPI_SITE = https://gitlab.com/recalbox/packages/hardware/xpi_gamecon_rpi.git XPI_GAMECON_RPI_SITE_METHOD = git XPI_GAMECON_RPI_DEPENDENCIES = linux -- GitLab