mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-06 11:07:37 +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-kbd-firmware.h"
|
||||
|
||||
struct _FuHaiLuckBlDevice {
|
||||
struct _FuHailuckBlDevice {
|
||||
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
|
||||
fu_hailuck_bl_device_attach (FuDevice *device, GError **error)
|
||||
@ -51,7 +51,7 @@ fu_hailuck_bl_device_probe (FuUsbDevice *device, GError **error)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
fu_hailuck_bl_device_read_block_start (FuHaiLuckBlDevice *self,
|
||||
fu_hailuck_bl_device_read_block_start (FuHailuckBlDevice *self,
|
||||
guint32 length,
|
||||
GError **error)
|
||||
{
|
||||
@ -66,7 +66,7 @@ fu_hailuck_bl_device_read_block_start (FuHaiLuckBlDevice *self,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
fu_hailuck_bl_device_read_block (FuHaiLuckBlDevice *self,
|
||||
fu_hailuck_bl_device_read_block (FuHailuckBlDevice *self,
|
||||
guint8 *data, gsize data_sz,
|
||||
GError **error)
|
||||
{
|
||||
@ -93,7 +93,7 @@ fu_hailuck_bl_device_read_block (FuHaiLuckBlDevice *self,
|
||||
static GBytes *
|
||||
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);
|
||||
g_autoptr(GByteArray) fwbuf = g_byte_array_new ();
|
||||
g_autoptr(GPtrArray) chunks = NULL;
|
||||
@ -121,7 +121,7 @@ fu_hailuck_bl_device_dump_firmware (FuDevice *device, GError **error)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
fu_hailuck_bl_device_erase (FuHaiLuckBlDevice *self, GError **error)
|
||||
fu_hailuck_bl_device_erase (FuHailuckBlDevice *self, GError **error)
|
||||
{
|
||||
guint8 buf[6] = {
|
||||
FU_HAILUCK_REPORT_ID_SHORT,
|
||||
@ -136,7 +136,7 @@ fu_hailuck_bl_device_erase (FuHaiLuckBlDevice *self, GError **error)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
fu_hailuck_bl_device_write_block_start (FuHaiLuckBlDevice *self,
|
||||
fu_hailuck_bl_device_write_block_start (FuHailuckBlDevice *self,
|
||||
guint32 length, GError **error)
|
||||
{
|
||||
guint8 buf[6] = {
|
||||
@ -150,7 +150,7 @@ fu_hailuck_bl_device_write_block_start (FuHaiLuckBlDevice *self,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
fu_hailuck_bl_device_write_block (FuHaiLuckBlDevice *self,
|
||||
fu_hailuck_bl_device_write_block (FuHailuckBlDevice *self,
|
||||
const guint8 *data, gsize data_sz,
|
||||
GError **error)
|
||||
{
|
||||
@ -192,7 +192,7 @@ fu_hailuck_bl_device_write_firmware (FuDevice *device,
|
||||
FwupdInstallFlags flags,
|
||||
GError **error)
|
||||
{
|
||||
FuHaiLuckBlDevice *self = FU_HAILUCK_BL_DEVICE (device);
|
||||
FuHailuckBlDevice *self = FU_HAILUCK_BL_DEVICE (device);
|
||||
FuChunk *chk0;
|
||||
g_autoptr(GBytes) fw = NULL;
|
||||
g_autoptr(GBytes) fw_new = NULL;
|
||||
@ -245,7 +245,7 @@ fu_hailuck_bl_device_write_firmware (FuDevice *device,
|
||||
}
|
||||
|
||||
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_protocol (FU_DEVICE (self), "com.hailuck.kbd");
|
||||
@ -260,7 +260,7 @@ fu_hailuck_bl_device_init (FuHaiLuckBlDevice *self)
|
||||
}
|
||||
|
||||
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);
|
||||
FuUsbDeviceClass *klass_usb_device = FU_USB_DEVICE_CLASS (klass);
|
||||
|
@ -10,4 +10,4 @@
|
||||
#include "fu-hid-device.h"
|
||||
|
||||
#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-tp-device.h"
|
||||
|
||||
struct _FuHaiLuckKbdDevice {
|
||||
struct _FuHailuckKbdDevice {
|
||||
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
|
||||
fu_hailuck_kbd_device_detach (FuDevice *device, GError **error)
|
||||
@ -36,7 +36,7 @@ static gboolean
|
||||
fu_hailuck_kbd_device_probe (FuUsbDevice *device, GError **error)
|
||||
{
|
||||
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 */
|
||||
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
|
||||
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_protocol (FU_DEVICE (self), "com.hailuck.kbd");
|
||||
@ -73,7 +73,7 @@ fu_hailuck_kbd_device_init (FuHaiLuckKbdDevice *self)
|
||||
}
|
||||
|
||||
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);
|
||||
FuUsbDeviceClass *klass_usb_device = FU_USB_DEVICE_CLASS (klass);
|
||||
|
@ -10,4 +10,4 @@
|
||||
#include "fu-hid-device.h"
|
||||
|
||||
#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"
|
||||
|
||||
struct _FuHaiLuckKbdFirmware {
|
||||
struct _FuHailuckKbdFirmware {
|
||||
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
|
||||
fu_hailuck_kbd_firmware_parse (FuFirmware *firmware,
|
||||
@ -67,12 +67,12 @@ fu_hailuck_kbd_firmware_parse (FuFirmware *firmware,
|
||||
}
|
||||
|
||||
static void
|
||||
fu_hailuck_kbd_firmware_init (FuHaiLuckKbdFirmware *self)
|
||||
fu_hailuck_kbd_firmware_init (FuHailuckKbdFirmware *self)
|
||||
{
|
||||
}
|
||||
|
||||
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);
|
||||
klass_firmware->parse = fu_hailuck_kbd_firmware_parse;
|
||||
|
@ -9,6 +9,6 @@
|
||||
#include "fu-ihex-firmware.h"
|
||||
|
||||
#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);
|
||||
|
@ -12,11 +12,11 @@
|
||||
#include "fu-hailuck-common.h"
|
||||
#include "fu-hailuck-tp-device.h"
|
||||
|
||||
struct _FuHaiLuckTpDevice {
|
||||
struct _FuHailuckTpDevice {
|
||||
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
|
||||
fu_hailuck_tp_device_probe (FuDevice *device, GError **error)
|
||||
@ -198,7 +198,7 @@ fu_hailuck_tp_device_write_firmware (FuDevice *device,
|
||||
}
|
||||
|
||||
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_set_firmware_size (FU_DEVICE (self), 0x6018);
|
||||
@ -213,7 +213,7 @@ fu_hailuck_tp_device_init (FuHaiLuckTpDevice *self)
|
||||
}
|
||||
|
||||
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);
|
||||
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;
|
||||
}
|
||||
|
||||
FuHaiLuckTpDevice *
|
||||
FuHailuckTpDevice *
|
||||
fu_hailuck_tp_device_new (FuDevice *device)
|
||||
{
|
||||
FuHaiLuckTpDevice *self;
|
||||
FuHailuckTpDevice *self;
|
||||
self = g_object_new (FU_TYPE_HAILUCK_TP_DEVICE,
|
||||
"parent", device,
|
||||
NULL);
|
||||
|
@ -9,6 +9,6 @@
|
||||
#include "fu-plugin.h"
|
||||
|
||||
#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]
|
||||
Plugin = hailuck
|
||||
GType = FuHaiLuckBlDevice
|
||||
GType = FuHailuckBlDevice
|
||||
#Flags = is-bootloader
|
||||
|
||||
[DeviceInstanceId=USB\VID_258A&PID_001E]
|
||||
Plugin = hailuck
|
||||
GType = FuHaiLuckKbdDevice
|
||||
GType = FuHailuckKbdDevice
|
||||
Vendor = PINE64
|
||||
CounterpartGuid = USB\VID_0603&PID_1020
|
||||
|
||||
@ -16,10 +16,10 @@ Name = Keyboard
|
||||
|
||||
[DeviceInstanceId=USB\VID_258A&PID_001F]
|
||||
Plugin = hailuck
|
||||
GType = FuHaiLuckKbdDevice
|
||||
GType = FuHailuckKbdDevice
|
||||
CounterpartGuid = USB\VID_0603&PID_1020
|
||||
|
||||
[DeviceInstanceId=USB\VID_258A&PID_000D]
|
||||
Plugin = hailuck
|
||||
GType = FuHaiLuckKbdDevice
|
||||
GType = FuHailuckKbdDevice
|
||||
CounterpartGuid = USB\VID_0603&PID_1020
|
||||
|
Loading…
Reference in New Issue
Block a user