mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-07 14:12:59 +00:00
hailuck: trivial: Fix the GType name
The vendor is Hailuck as in one word, not Hai Luck.
This commit is contained in:
parent
9ce0922448
commit
96ec0198e5
@ -11,11 +11,11 @@
|
|||||||
#include "fu-hailuck-bl-device.h"
|
#include "fu-hailuck-bl-device.h"
|
||||||
#include "fu-hailuck-kbd-firmware.h"
|
#include "fu-hailuck-kbd-firmware.h"
|
||||||
|
|
||||||
struct _FuHaiLuckBlDevice {
|
struct _FuHailuckBlDevice {
|
||||||
FuHidDevice parent_instance;
|
FuHidDevice parent_instance;
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE (FuHaiLuckBlDevice, fu_hailuck_bl_device, FU_TYPE_HID_DEVICE)
|
G_DEFINE_TYPE (FuHailuckBlDevice, fu_hailuck_bl_device, FU_TYPE_HID_DEVICE)
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
fu_hailuck_bl_device_attach (FuDevice *device, GError **error)
|
fu_hailuck_bl_device_attach (FuDevice *device, GError **error)
|
||||||
@ -51,7 +51,7 @@ fu_hailuck_bl_device_probe (FuUsbDevice *device, GError **error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
fu_hailuck_bl_device_read_block_start (FuHaiLuckBlDevice *self,
|
fu_hailuck_bl_device_read_block_start (FuHailuckBlDevice *self,
|
||||||
guint32 length,
|
guint32 length,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
@ -66,7 +66,7 @@ fu_hailuck_bl_device_read_block_start (FuHaiLuckBlDevice *self,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
fu_hailuck_bl_device_read_block (FuHaiLuckBlDevice *self,
|
fu_hailuck_bl_device_read_block (FuHailuckBlDevice *self,
|
||||||
guint8 *data, gsize data_sz,
|
guint8 *data, gsize data_sz,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
@ -93,7 +93,7 @@ fu_hailuck_bl_device_read_block (FuHaiLuckBlDevice *self,
|
|||||||
static GBytes *
|
static GBytes *
|
||||||
fu_hailuck_bl_device_dump_firmware (FuDevice *device, GError **error)
|
fu_hailuck_bl_device_dump_firmware (FuDevice *device, GError **error)
|
||||||
{
|
{
|
||||||
FuHaiLuckBlDevice *self = FU_HAILUCK_BL_DEVICE (device);
|
FuHailuckBlDevice *self = FU_HAILUCK_BL_DEVICE (device);
|
||||||
gsize fwsz = fu_device_get_firmware_size_max (device);
|
gsize fwsz = fu_device_get_firmware_size_max (device);
|
||||||
g_autoptr(GByteArray) fwbuf = g_byte_array_new ();
|
g_autoptr(GByteArray) fwbuf = g_byte_array_new ();
|
||||||
g_autoptr(GPtrArray) chunks = NULL;
|
g_autoptr(GPtrArray) chunks = NULL;
|
||||||
@ -121,7 +121,7 @@ fu_hailuck_bl_device_dump_firmware (FuDevice *device, GError **error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
fu_hailuck_bl_device_erase (FuHaiLuckBlDevice *self, GError **error)
|
fu_hailuck_bl_device_erase (FuHailuckBlDevice *self, GError **error)
|
||||||
{
|
{
|
||||||
guint8 buf[6] = {
|
guint8 buf[6] = {
|
||||||
FU_HAILUCK_REPORT_ID_SHORT,
|
FU_HAILUCK_REPORT_ID_SHORT,
|
||||||
@ -136,7 +136,7 @@ fu_hailuck_bl_device_erase (FuHaiLuckBlDevice *self, GError **error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
fu_hailuck_bl_device_write_block_start (FuHaiLuckBlDevice *self,
|
fu_hailuck_bl_device_write_block_start (FuHailuckBlDevice *self,
|
||||||
guint32 length, GError **error)
|
guint32 length, GError **error)
|
||||||
{
|
{
|
||||||
guint8 buf[6] = {
|
guint8 buf[6] = {
|
||||||
@ -150,7 +150,7 @@ fu_hailuck_bl_device_write_block_start (FuHaiLuckBlDevice *self,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
fu_hailuck_bl_device_write_block (FuHaiLuckBlDevice *self,
|
fu_hailuck_bl_device_write_block (FuHailuckBlDevice *self,
|
||||||
const guint8 *data, gsize data_sz,
|
const guint8 *data, gsize data_sz,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
@ -192,7 +192,7 @@ fu_hailuck_bl_device_write_firmware (FuDevice *device,
|
|||||||
FwupdInstallFlags flags,
|
FwupdInstallFlags flags,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
FuHaiLuckBlDevice *self = FU_HAILUCK_BL_DEVICE (device);
|
FuHailuckBlDevice *self = FU_HAILUCK_BL_DEVICE (device);
|
||||||
FuChunk *chk0;
|
FuChunk *chk0;
|
||||||
g_autoptr(GBytes) fw = NULL;
|
g_autoptr(GBytes) fw = NULL;
|
||||||
g_autoptr(GBytes) fw_new = NULL;
|
g_autoptr(GBytes) fw_new = NULL;
|
||||||
@ -245,7 +245,7 @@ fu_hailuck_bl_device_write_firmware (FuDevice *device,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fu_hailuck_bl_device_init (FuHaiLuckBlDevice *self)
|
fu_hailuck_bl_device_init (FuHailuckBlDevice *self)
|
||||||
{
|
{
|
||||||
fu_device_set_firmware_size (FU_DEVICE (self), 0x4000);
|
fu_device_set_firmware_size (FU_DEVICE (self), 0x4000);
|
||||||
fu_device_set_protocol (FU_DEVICE (self), "com.hailuck.kbd");
|
fu_device_set_protocol (FU_DEVICE (self), "com.hailuck.kbd");
|
||||||
@ -260,7 +260,7 @@ fu_hailuck_bl_device_init (FuHaiLuckBlDevice *self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fu_hailuck_bl_device_class_init (FuHaiLuckBlDeviceClass *klass)
|
fu_hailuck_bl_device_class_init (FuHailuckBlDeviceClass *klass)
|
||||||
{
|
{
|
||||||
FuDeviceClass *klass_device = FU_DEVICE_CLASS (klass);
|
FuDeviceClass *klass_device = FU_DEVICE_CLASS (klass);
|
||||||
FuUsbDeviceClass *klass_usb_device = FU_USB_DEVICE_CLASS (klass);
|
FuUsbDeviceClass *klass_usb_device = FU_USB_DEVICE_CLASS (klass);
|
||||||
|
@ -10,4 +10,4 @@
|
|||||||
#include "fu-hid-device.h"
|
#include "fu-hid-device.h"
|
||||||
|
|
||||||
#define FU_TYPE_HAILUCK_BL_DEVICE (fu_hailuck_bl_device_get_type ())
|
#define FU_TYPE_HAILUCK_BL_DEVICE (fu_hailuck_bl_device_get_type ())
|
||||||
G_DECLARE_FINAL_TYPE (FuHaiLuckBlDevice, fu_hailuck_bl_device, FU, HAILUCK_BL_DEVICE, FuHidDevice)
|
G_DECLARE_FINAL_TYPE (FuHailuckBlDevice, fu_hailuck_bl_device, FU, HAILUCK_BL_DEVICE, FuHidDevice)
|
||||||
|
@ -10,11 +10,11 @@
|
|||||||
#include "fu-hailuck-kbd-device.h"
|
#include "fu-hailuck-kbd-device.h"
|
||||||
#include "fu-hailuck-tp-device.h"
|
#include "fu-hailuck-tp-device.h"
|
||||||
|
|
||||||
struct _FuHaiLuckKbdDevice {
|
struct _FuHailuckKbdDevice {
|
||||||
FuHidDevice parent_instance;
|
FuHidDevice parent_instance;
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE (FuHaiLuckKbdDevice, fu_hailuck_kbd_device, FU_TYPE_HID_DEVICE)
|
G_DEFINE_TYPE (FuHailuckKbdDevice, fu_hailuck_kbd_device, FU_TYPE_HID_DEVICE)
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
fu_hailuck_kbd_device_detach (FuDevice *device, GError **error)
|
fu_hailuck_kbd_device_detach (FuDevice *device, GError **error)
|
||||||
@ -36,7 +36,7 @@ static gboolean
|
|||||||
fu_hailuck_kbd_device_probe (FuUsbDevice *device, GError **error)
|
fu_hailuck_kbd_device_probe (FuUsbDevice *device, GError **error)
|
||||||
{
|
{
|
||||||
g_autofree gchar *devid = NULL;
|
g_autofree gchar *devid = NULL;
|
||||||
g_autoptr(FuHaiLuckTpDevice) tp_device = fu_hailuck_tp_device_new (FU_DEVICE (device));
|
g_autoptr(FuHailuckTpDevice) tp_device = fu_hailuck_tp_device_new (FU_DEVICE (device));
|
||||||
|
|
||||||
/* add extra keyboard-specific GUID */
|
/* add extra keyboard-specific GUID */
|
||||||
devid = g_strdup_printf ("USB\\VID_%04X&PID_%04X&MODE_KBD",
|
devid = g_strdup_printf ("USB\\VID_%04X&PID_%04X&MODE_KBD",
|
||||||
@ -60,7 +60,7 @@ fu_hailuck_kbd_device_probe (FuUsbDevice *device, GError **error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fu_hailuck_kbd_device_init (FuHaiLuckKbdDevice *self)
|
fu_hailuck_kbd_device_init (FuHailuckKbdDevice *self)
|
||||||
{
|
{
|
||||||
fu_device_set_firmware_size (FU_DEVICE (self), 0x4000);
|
fu_device_set_firmware_size (FU_DEVICE (self), 0x4000);
|
||||||
fu_device_set_protocol (FU_DEVICE (self), "com.hailuck.kbd");
|
fu_device_set_protocol (FU_DEVICE (self), "com.hailuck.kbd");
|
||||||
@ -73,7 +73,7 @@ fu_hailuck_kbd_device_init (FuHaiLuckKbdDevice *self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fu_hailuck_kbd_device_class_init (FuHaiLuckKbdDeviceClass *klass)
|
fu_hailuck_kbd_device_class_init (FuHailuckKbdDeviceClass *klass)
|
||||||
{
|
{
|
||||||
FuDeviceClass *klass_device = FU_DEVICE_CLASS (klass);
|
FuDeviceClass *klass_device = FU_DEVICE_CLASS (klass);
|
||||||
FuUsbDeviceClass *klass_usb_device = FU_USB_DEVICE_CLASS (klass);
|
FuUsbDeviceClass *klass_usb_device = FU_USB_DEVICE_CLASS (klass);
|
||||||
|
@ -10,4 +10,4 @@
|
|||||||
#include "fu-hid-device.h"
|
#include "fu-hid-device.h"
|
||||||
|
|
||||||
#define FU_TYPE_HAILUCK_KBD_DEVICE (fu_hailuck_kbd_device_get_type ())
|
#define FU_TYPE_HAILUCK_KBD_DEVICE (fu_hailuck_kbd_device_get_type ())
|
||||||
G_DECLARE_FINAL_TYPE (FuHaiLuckKbdDevice, fu_hailuck_kbd_device, FU, HAILUCK_KBD_DEVICE, FuHidDevice)
|
G_DECLARE_FINAL_TYPE (FuHailuckKbdDevice, fu_hailuck_kbd_device, FU, HAILUCK_KBD_DEVICE, FuHidDevice)
|
||||||
|
@ -10,11 +10,11 @@
|
|||||||
|
|
||||||
#include "fu-hailuck-kbd-firmware.h"
|
#include "fu-hailuck-kbd-firmware.h"
|
||||||
|
|
||||||
struct _FuHaiLuckKbdFirmware {
|
struct _FuHailuckKbdFirmware {
|
||||||
FuIhexFirmwareClass parent_instance;
|
FuIhexFirmwareClass parent_instance;
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE (FuHaiLuckKbdFirmware, fu_hailuck_kbd_firmware, FU_TYPE_IHEX_FIRMWARE)
|
G_DEFINE_TYPE (FuHailuckKbdFirmware, fu_hailuck_kbd_firmware, FU_TYPE_IHEX_FIRMWARE)
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
fu_hailuck_kbd_firmware_parse (FuFirmware *firmware,
|
fu_hailuck_kbd_firmware_parse (FuFirmware *firmware,
|
||||||
@ -67,12 +67,12 @@ fu_hailuck_kbd_firmware_parse (FuFirmware *firmware,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fu_hailuck_kbd_firmware_init (FuHaiLuckKbdFirmware *self)
|
fu_hailuck_kbd_firmware_init (FuHailuckKbdFirmware *self)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fu_hailuck_kbd_firmware_class_init (FuHaiLuckKbdFirmwareClass *klass)
|
fu_hailuck_kbd_firmware_class_init (FuHailuckKbdFirmwareClass *klass)
|
||||||
{
|
{
|
||||||
FuFirmwareClass *klass_firmware = FU_FIRMWARE_CLASS (klass);
|
FuFirmwareClass *klass_firmware = FU_FIRMWARE_CLASS (klass);
|
||||||
klass_firmware->parse = fu_hailuck_kbd_firmware_parse;
|
klass_firmware->parse = fu_hailuck_kbd_firmware_parse;
|
||||||
|
@ -9,6 +9,6 @@
|
|||||||
#include "fu-ihex-firmware.h"
|
#include "fu-ihex-firmware.h"
|
||||||
|
|
||||||
#define FU_TYPE_HAILUCK_KBD_FIRMWARE (fu_hailuck_kbd_firmware_get_type ())
|
#define FU_TYPE_HAILUCK_KBD_FIRMWARE (fu_hailuck_kbd_firmware_get_type ())
|
||||||
G_DECLARE_FINAL_TYPE (FuHaiLuckKbdFirmware, fu_hailuck_kbd_firmware, FU, HAILUCK_KBD_FIRMWARE, FuIhexFirmware)
|
G_DECLARE_FINAL_TYPE (FuHailuckKbdFirmware, fu_hailuck_kbd_firmware, FU, HAILUCK_KBD_FIRMWARE, FuIhexFirmware)
|
||||||
|
|
||||||
FuFirmware *fu_hailuck_kbd_firmware_new (void);
|
FuFirmware *fu_hailuck_kbd_firmware_new (void);
|
||||||
|
@ -12,11 +12,11 @@
|
|||||||
#include "fu-hailuck-common.h"
|
#include "fu-hailuck-common.h"
|
||||||
#include "fu-hailuck-tp-device.h"
|
#include "fu-hailuck-tp-device.h"
|
||||||
|
|
||||||
struct _FuHaiLuckTpDevice {
|
struct _FuHailuckTpDevice {
|
||||||
FuDevice parent_instance;
|
FuDevice parent_instance;
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE (FuHaiLuckTpDevice, fu_hailuck_tp_device, FU_TYPE_DEVICE)
|
G_DEFINE_TYPE (FuHailuckTpDevice, fu_hailuck_tp_device, FU_TYPE_DEVICE)
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
fu_hailuck_tp_device_probe (FuDevice *device, GError **error)
|
fu_hailuck_tp_device_probe (FuDevice *device, GError **error)
|
||||||
@ -198,7 +198,7 @@ fu_hailuck_tp_device_write_firmware (FuDevice *device,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fu_hailuck_tp_device_init (FuHaiLuckTpDevice *self)
|
fu_hailuck_tp_device_init (FuHailuckTpDevice *self)
|
||||||
{
|
{
|
||||||
fu_device_retry_set_delay (FU_DEVICE (self), 50); /* ms */
|
fu_device_retry_set_delay (FU_DEVICE (self), 50); /* ms */
|
||||||
fu_device_set_firmware_size (FU_DEVICE (self), 0x6018);
|
fu_device_set_firmware_size (FU_DEVICE (self), 0x6018);
|
||||||
@ -213,7 +213,7 @@ fu_hailuck_tp_device_init (FuHaiLuckTpDevice *self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fu_hailuck_tp_device_class_init (FuHaiLuckTpDeviceClass *klass)
|
fu_hailuck_tp_device_class_init (FuHailuckTpDeviceClass *klass)
|
||||||
{
|
{
|
||||||
FuDeviceClass *klass_device = FU_DEVICE_CLASS (klass);
|
FuDeviceClass *klass_device = FU_DEVICE_CLASS (klass);
|
||||||
klass_device->write_firmware = fu_hailuck_tp_device_write_firmware;
|
klass_device->write_firmware = fu_hailuck_tp_device_write_firmware;
|
||||||
@ -222,10 +222,10 @@ fu_hailuck_tp_device_class_init (FuHaiLuckTpDeviceClass *klass)
|
|||||||
klass_device->probe = fu_hailuck_tp_device_probe;
|
klass_device->probe = fu_hailuck_tp_device_probe;
|
||||||
}
|
}
|
||||||
|
|
||||||
FuHaiLuckTpDevice *
|
FuHailuckTpDevice *
|
||||||
fu_hailuck_tp_device_new (FuDevice *device)
|
fu_hailuck_tp_device_new (FuDevice *device)
|
||||||
{
|
{
|
||||||
FuHaiLuckTpDevice *self;
|
FuHailuckTpDevice *self;
|
||||||
self = g_object_new (FU_TYPE_HAILUCK_TP_DEVICE,
|
self = g_object_new (FU_TYPE_HAILUCK_TP_DEVICE,
|
||||||
"parent", device,
|
"parent", device,
|
||||||
NULL);
|
NULL);
|
||||||
|
@ -9,6 +9,6 @@
|
|||||||
#include "fu-plugin.h"
|
#include "fu-plugin.h"
|
||||||
|
|
||||||
#define FU_TYPE_HAILUCK_TP_DEVICE (fu_hailuck_tp_device_get_type ())
|
#define FU_TYPE_HAILUCK_TP_DEVICE (fu_hailuck_tp_device_get_type ())
|
||||||
G_DECLARE_FINAL_TYPE (FuHaiLuckTpDevice, fu_hailuck_tp_device, FU, HAILUCK_TP_DEVICE, FuDevice)
|
G_DECLARE_FINAL_TYPE (FuHailuckTpDevice, fu_hailuck_tp_device, FU, HAILUCK_TP_DEVICE, FuDevice)
|
||||||
|
|
||||||
FuHaiLuckTpDevice *fu_hailuck_tp_device_new (FuDevice *parent);
|
FuHailuckTpDevice *fu_hailuck_tp_device_new (FuDevice *parent);
|
||||||
|
@ -2,12 +2,12 @@
|
|||||||
|
|
||||||
[DeviceInstanceId=USB\VID_0603&PID_1020]
|
[DeviceInstanceId=USB\VID_0603&PID_1020]
|
||||||
Plugin = hailuck
|
Plugin = hailuck
|
||||||
GType = FuHaiLuckBlDevice
|
GType = FuHailuckBlDevice
|
||||||
#Flags = is-bootloader
|
#Flags = is-bootloader
|
||||||
|
|
||||||
[DeviceInstanceId=USB\VID_258A&PID_001E]
|
[DeviceInstanceId=USB\VID_258A&PID_001E]
|
||||||
Plugin = hailuck
|
Plugin = hailuck
|
||||||
GType = FuHaiLuckKbdDevice
|
GType = FuHailuckKbdDevice
|
||||||
Vendor = PINE64
|
Vendor = PINE64
|
||||||
CounterpartGuid = USB\VID_0603&PID_1020
|
CounterpartGuid = USB\VID_0603&PID_1020
|
||||||
|
|
||||||
@ -16,10 +16,10 @@ Name = Keyboard
|
|||||||
|
|
||||||
[DeviceInstanceId=USB\VID_258A&PID_001F]
|
[DeviceInstanceId=USB\VID_258A&PID_001F]
|
||||||
Plugin = hailuck
|
Plugin = hailuck
|
||||||
GType = FuHaiLuckKbdDevice
|
GType = FuHailuckKbdDevice
|
||||||
CounterpartGuid = USB\VID_0603&PID_1020
|
CounterpartGuid = USB\VID_0603&PID_1020
|
||||||
|
|
||||||
[DeviceInstanceId=USB\VID_258A&PID_000D]
|
[DeviceInstanceId=USB\VID_258A&PID_000D]
|
||||||
Plugin = hailuck
|
Plugin = hailuck
|
||||||
GType = FuHaiLuckKbdDevice
|
GType = FuHailuckKbdDevice
|
||||||
CounterpartGuid = USB\VID_0603&PID_1020
|
CounterpartGuid = USB\VID_0603&PID_1020
|
||||||
|
Loading…
Reference in New Issue
Block a user